Identifying Lightcurve inputs in HENreadevents, and modifying the user warning.#176
Open
Sudarshan-21 wants to merge 3 commits intoStingraySoftware:mainfrom
Open
Identifying Lightcurve inputs in HENreadevents, and modifying the user warning.#176Sudarshan-21 wants to merge 3 commits intoStingraySoftware:mainfrom
Sudarshan-21 wants to merge 3 commits intoStingraySoftware:mainfrom
Conversation
…ghtcurve file, by integrating is_lightcurve function
kashish2210
reviewed
Apr 21, 2025
| if len(hdulist) < 2: | ||
| return False | ||
|
|
||
| data_hdu = hdulist[1] |
Member
There was a problem hiding this comment.
Check every extension (not just hdulist[1]).
| colnames = [col.name.upper() for col in data_hdu.columns] | ||
|
|
||
| time_col = "TIME" in colnames | ||
| lc_like_col = any(x in colnames for x in ["FLUX", "RATE", "COUNTS", "SAP_FLUX", "PDCSAP_FLUX"]) |
Member
There was a problem hiding this comment.
for name in [
"ERROR",
"FRACEXP"
])You may include this also .
Member
There was a problem hiding this comment.
Accept columns common in NICER data like "ERROR", "FRACEXP" as part of the light curve signature.
Member
|
@Sudarshan-21 thanks for your PR this looks good to me but we have take care of NICER datas handling that is going to handle by stingray (I have lefted some comments ). And also include some checks and tests as per the contributing guidelines. |
Author
|
@kashish2210, thank you for the suggestions!! I will review them and try to make the necessary changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #129
Description:
This enhancement ensures that, if user inputs a Lightcurve, it will first identify, it is a lightcurve, and will notify the user about it, further, it will ask the user, whether or not to proceed, as shown in the attached image. Depending on the chosen option, the file reading or aborting the process will be done.
Current Behavior
Enhanced Behavior

PS: The previous PR is closed, since I was having some conflicts with that forked repo.