-
Notifications
You must be signed in to change notification settings - Fork 20
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
ckarwin
wants to merge
9
commits into
cositools:develop
Choose a base branch
from
ckarwin:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
SAA Passage #289
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
|
GallegoSav
approved these changes
Feb 7, 2025
There was a problem hiding this 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 👍
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
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.
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)](https://private-user-images.githubusercontent.com/54562666/409681671-7d6abc3d-83ce-4c36-ba7a-ea4f60d5f4f9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTMzMzYsIm5iZiI6MTczOTE1MzAzNiwicGF0aCI6Ii81NDU2MjY2Ni80MDk2ODE2NzEtN2Q2YWJjM2QtODNjZS00YzM2LWJhN2EtZWE0ZjYwZDVmNGY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAyMDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyNzU5MTZhZjA5M2FjMjFhZGI0ZmE2OGM4ZGFjZDBhYjc3M2QxNDk4MGI3OTFmMWYwY2NmMmY3YmQzZDc4ODEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6f2oYJFtoW7Jyp0oOO-uf2zcdrXEqIYitKpsUcNOGCM)
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](https://private-user-images.githubusercontent.com/54562666/409682470-cc107a59-0517-4dd4-a534-e5123b7af843.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTMzMzYsIm5iZiI6MTczOTE1MzAzNiwicGF0aCI6Ii81NDU2MjY2Ni80MDk2ODI0NzAtY2MxMDdhNTktMDUxNy00ZGQ0LWE1MzQtZTUxMjNiN2FmODQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAyMDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiNWZmYzZhOTI2YWU1ZGY4MjFlMGM4MjI1NTRmMzU4YjczOGFiYWMwYjBkMzcwN2I5NjE0YjM1NWM1ZDMwZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.1oMKpF2N7aCKs6O5zKMnozvg2Lce_QeMxyPOLSPf3Ek)
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](https://private-user-images.githubusercontent.com/54562666/409684766-fcf8f993-931b-4016-b24b-2e59a788a822.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNTMzMzYsIm5iZiI6MTczOTE1MzAzNiwicGF0aCI6Ii81NDU2MjY2Ni80MDk2ODQ3NjYtZmNmOGY5OTMtOTMxYi00MDE2LWIyNGItMmU1OWE3ODhhODIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDAyMDM1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM2ZjJiOGRmNzRjYzQ2Nzc4ZmI1OTMyNTZlY2NlNTM1NjljMmE2MTFmZWY0MDAyNGE1ZDY0M2Q2YmQ0MDY5YzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oKTUul0pyjlTH0zqam3c9RnXzUWrPQfStG8hD3TZgdQ)