-
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
pyirf/irf/background.py
Outdated
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.
Remove compatibility pins
Add 2023 ICRC paper to README
…ensions The different methods use binning in different coordinate systems - effective_area_3D_polar uses a polar coordinate system with radial FOV offset and azimuthal FOV position angle bins - effective_area_3D_nominal uses a nominal coordinate system with FOV longitude and FOV latitude bins
These calculate the number of showers in each bin for different coordinate systems - calculate_n_showers_3D_polar uses a polar coordinate system with radial FOV offset bins and azimuthal FOV position angle bins - calculate_n_showers_3D_nominal uses a nominal coordinate system with FOV longitude and latitude bins
Remove stale debugging code Add news fragment Update energy_dispersion_to_migration - divide by the migration bin widths before resampling - minor style and format changes Fix pdf conversion to probability, remove final norm
Simplify normalization code for migra matrix
update unit test
Fix test_energy_dispersion_to_migration
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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
.