-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add basic facilities for 3D background irfs #276
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
- Coverage 95.60% 94.83% -0.78%
==========================================
Files 62 62
Lines 3278 3308 +30
==========================================
+ Hits 3134 3137 +3
- Misses 144 171 +27 ☔ View full report in Codecov by Sentry. |
def create_background_3d_hdu( | ||
background_3d, | ||
reco_energy_bins, | ||
fov_offset_bins, |
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.
should have fov_lon_bins
/ fov_lat_bins
background_3d, | ||
reco_energy_bins, | ||
fov_offset_bins, | ||
extname="BACKGROUND", |
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.
needs to define the alignment
header["HDUCLAS2"] = "BKG" | ||
header["HDUCLAS3"] = "FULL-ENCLOSURE" | ||
header["HDUCLAS4"] = "BKG_2D" | ||
header["FOVALIGN"] = "ALTAZ" |
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.
This should be an argument, not hard-coded
per_energy = (hist.T / bin_width_energy).T | ||
|
||
# divide by solid angle in each fov bin and the observation time | ||
bin_solid_angle = np.diff(fov_offset_bins) |
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.
Add functions for making a 3D background using square bins, this requires that the event tables have the two columns
reco_fov_lat
andreco_fov_lon
.