-
Notifications
You must be signed in to change notification settings - Fork 78
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
Fix theta2 notebook #1354
base: main
Are you sure you want to change the base?
Fix theta2 notebook #1354
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1354 +/- ##
=======================================
Coverage 72.86% 72.86%
=======================================
Files 137 137
Lines 14515 14515
=======================================
Hits 10576 10576
Misses 3939 3939 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I do not understand - why can't the alpha value be computed purely "from geometry"? How does the value 0.17 come up? Is it from normalization of counts in some range (a bad idea, particularly for a bright source)
I think the simplest and most general would be Monte Carlo - just throw random events with uniform distribution in the F0V (large enough to contain on and off) and counting how many end up in on and off. |
In my opinion, nothing is preventing that. It's just a different logic. The normalization on some range is also making sense, but the combination of PSF and small offset make this exercise complex. |
I could try, but will only work for not too large offset. |
|
I do not know how the implementation would look like, but I think it would work for any offset, at least to compute the purely geometrical factor (solid angle ratio). |
Yes, if the offset is small enough and theta2 axis small enough the uniform distribution will do the jobs, but at larger offset or theta2, you will definitely need a model to correct. And I'm not sure we should add this in the notebook as it will complexify a lot the computation and user will have to control the quality of the model. |
Yes, but for point like source and standard offset, the region close to theta2 = 0 should not be affected too much (except maybe at the lowest energy). |
This mostly fix issue #1353 .
Included change :
With the Crab example dataset from the school significance vary :
The alpha value is correct for 10 GeV - 100 GeV range (0.33) but still incorrect for 1 TeV-10 TeV range (0.17). This is very likely due to the contamination of the off counts by the Crab (visible in the shape of the off counts).
The option of exclusion region is deactivated by default as it could cause some issue (see plots below) and didn't completely fix the remaining issue on alpha value mentionned above.
I could look to implement a correction for the counts for the exclusion region, hoping to fix completely the issue, but I don't have an idea for a simplistic algorithm (in the idea of this notebook) right now.
Theta 2 plots without exclusion

Theta 2 plots with exclusion
