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

SAA Passage #289

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

SAA Passage #289

wants to merge 9 commits into from

Conversation

ckarwin
Copy link
Contributor

@ckarwin ckarwin commented Feb 4, 2025

I modified the code to account for SAA passage. The live time corresponding to the SAA passage is now passed in the ori file, as shown below:
image (5)

I added methods in the dataIO class to cut photons detected during the SAA passage. The method first scans the ori file to find the bad time intervals, and then filters the good data. A sanity check is shown below. This is for DC3 simulations of a 511 keV point source at the Galactic center. In this case the SAA cuts a bit less than half the events.
Screenshot 2025-02-04 at 1 09 07 PM

Screenshot 2025-02-04 at 1 10 15 PM

For the model fitting, this is implemented in cosilike via the scattmap calculation. As a sanity check I compared the MEGAlib simulations to the predicted counts from cosipy, shown below. They are in very good agreement. There is a discrepancy of 1.35%, compared to 0.43% before implementing the SAA cut. At this time it's not clear to me why the discrepancy has increased slightly, however, it is overall very small. I think it's ok to move forward with this for now and see if it can be refined in the future. It may just be due to the binning.
Screenshot 2025-02-04 at 1 16 32 PM

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 82.05128% with 7 lines in your changes missing coverage. Please review.

Project coverage is 79.74%. Comparing base (f5d59a3) to head (3f0e09e).

Files with missing lines Patch % Lines
cosipy/data_io/UnBinnedData.py 78.12% 7 Missing ⚠️
Files with missing lines Coverage Δ
cosipy/spacecraftfile/SpacecraftFile.py 91.01% <100.00%> (+0.06%) ⬆️
cosipy/data_io/UnBinnedData.py 93.09% <78.12%> (-1.78%) ⬇️

@ckarwin ckarwin linked an issue Feb 5, 2025 that may be closed by this pull request
Copy link
Contributor

@GallegoSav GallegoSav left a comment

Choose a reason for hiding this comment

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

good to go for me 👍

@ckarwin
Copy link
Contributor Author

ckarwin commented Feb 7, 2025

Thanks, @GallegoSav. Do you want to merge?

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.

Handling the SAA passages
2 participants