Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for reading Fermi/gbm fits file in Eventlist.read #894

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ankitkhushwaha
Copy link
Contributor

@ankitkhushwaha ankitkhushwaha commented Mar 2, 2025

@ankitkhushwaha ankitkhushwaha marked this pull request as draft March 2, 2025 19:00
@ankitkhushwaha ankitkhushwaha marked this pull request as ready for review March 3, 2025 11:13

time = hdulist[2].data.field("TIME")
channels = hdulist[2].data.field("PHA")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently this only read fermi/gbm TTE data

from stingray.events import EventList

evt = EventList(time, energy, header)
evt.trigtime = trigtime
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now i just associated trigtime with EventList, let me know if anything else needs to be done.

@@ -627,6 +634,14 @@ def read(cls, filename, fmt=None, rmf_file=None, **kwargs):
if fits_ext in get_file_extension(filename).lower():
fmt = "hea"
break

source = kwargs.pop("source", None)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to detect the fermi/gbm files i used a new keyword source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make EventList.read work on Fermi/GBM data
1 participant