Skip to content

G/H evaluation - interpolation in e and z#57

Merged
GernotMaier merged 12 commits into
mainfrom
interpolate-e-ze
May 11, 2026
Merged

G/H evaluation - interpolation in e and z#57
GernotMaier merged 12 commits into
mainfrom
interpolate-e-ze

Conversation

@GernotMaier
Copy link
Copy Markdown
Member

No description provided.

@GernotMaier GernotMaier self-assigned this Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds energy-bin interpolation support to the gamma/hadron classification application pipeline and strengthens the cut-optimization utilities by validating/interpolating rate/efficiency surfaces over energy and zenith (via 1/cos(ze) or cos(ze)).

Changes:

  • Add energy_interpolation_bins() to compute (e_bin_lo, e_bin_hi, e_alpha) per event for linear interpolation between neighboring energy-bin models.
  • Update classification model application to interpolate probabilities and efficiency-threshold cuts between adjacent energy-bin models.
  • Add unit tests covering rate-grid interpolation helpers, efficiency-surface interpolation, spectral reweighting, and classification apply interpolation; add astropy to package dependencies.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_optimize_classification.py Adds unit tests for optimize-classification interpolation helpers and spectral reweighting.
tests/test_classification_apply_interpolation.py Adds tests for energy interpolation bin selection and interpolated classification apply behavior.
src/eventdisplay_ml/scripts/optimize_classification.py Updates Crab spectral index constant used for reweighting; provides helpers exercised by new tests.
src/eventdisplay_ml/models.py Applies classification models using (e_bin_lo, e_bin_hi, e_alpha) and interpolates probabilities/thresholds across bins.
src/eventdisplay_ml/data_processing.py Introduces energy_interpolation_bins() helper to compute neighbor bins + interpolation weights.
pyproject.toml Adds astropy to runtime dependencies (used by optimize/plot scripts).
.gitignore Ignores .vscode/ and tmp_testing* artifacts.

@GernotMaier GernotMaier marked this pull request as ready for review May 11, 2026 07:45
@GernotMaier GernotMaier merged commit dd775f6 into main May 11, 2026
3 checks passed
@GernotMaier GernotMaier deleted the interpolate-e-ze branch May 11, 2026 07:47
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.

2 participants