-
Notifications
You must be signed in to change notification settings - Fork 27
GoodTimeInterval class #415
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
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
... and 15 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Thanks, @hirokiyoneda. It looks good so far. A couple of comments:
|
|
@ayshih are there plans to move TimeRange to astropy? |
|
@hiyoneda I don't have any plans to work on the phase-resolved analysis myself, but I think other people are working on this. I agree with the comment from @israelmcmc: with DC4 we plan to have numerous event selections, and so we should probably coordinate on how this should be organized. Note that the dataIO class has a method to filter SAA events: cosipy/cosipy/data_io/UnBinnedData.py Line 827 in e9dca56
This relies on finding the good time intervals (or in this case, the bad time intervals): cosipy/cosipy/data_io/UnBinnedData.py Line 762 in e9dca56
|
|
@israelmcmc OK, I renamed the directory to 'event_selection'. The TimeRange class sounds useful. I will consider using it if TimeRange is included in astropy in the future, but for now, it may be fine not to use it. @ckarwin Yes, I know that the SAA filtering method was already implemented. I think that by using GTI as a separate file, the SAA filtering could become more flexible. In the case of NuSTAR, there are several options for the SAA filtering, which use different tracers of the SAA. Also, for COSI, we may want to compare our analysis with different SAA cuts. If we can filter events with a GTI file in a general way, we just need to prepare a new GTI file for a different SAA criterion. Then, the other part of the code does not need to be changed. For this purpose, I added a new method "filter_good_data_with_gti" to the UnBinnedData class. I realize this implementation might change when the EventSelectionInterface is implemented in the future, but could you take a look and let me know if this approach seems reasonable for now? |
|
@israelmcmc, I am wondering how the GTI should be included in the response matrix calculation. Currently, a response in the galactic coordinate for a point source is calculated using ScattMap. More specifically, the location of a source is first specified, and then To include the GTI in this calculation, I think there are two possible solutions:
I prefer the first option, but what do you think? |
- removed is_in_gti - renamed parameters for tstart and tstop - add property methods for tstart and tstop
|
@hiyoneda We talked about it, but just for the record, I agree we should go with option 1. You load the information from the SC file, get a class instance, and then you can edit the live time of that instance. In the interfaces branched the SpacefractFile as renamed to SpacecraftHistory, as it doesn't necessarily need to read a file. The code was also refactored, besides changing the name, so this kind of operations should be easier. |
I started working on developing a class for the good time intervals (GTIs). GTI is used to determine the time intervals when data is analyzed. It will be incorporated into several classes related to the event selection and response matrix calculation.
@israelmcmc I added the first code for the GTI, which is put in the new directory ``good_time_intervals''. Do you think that it is reasonable? If it is better to move it to any existing directory, let me know.
@ckarwin, I think this is also related to the phase-resolved analysis, which you may already be working on. Once it is implemented in the cosipy, the phase-resolved analysis can be performed by determining the GTIs corresponding to the phase we want to analyze.