VERITAS-Observatory / V2DL3

VERITAS (VEGAS and Eventdisplay) to DL3 Converter
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Introduce axis dependent fuzzy boundaries (Eventdisplay converter) #183

Closed GernotMaier closed 10 months ago

GernotMaier commented 10 months ago

We have observations outside of the parameter space of our instrument response functions. These are typically very low-elevation runs (IRFs start at 30 deg elevation only; e.g., the Galactic center culminates below) or very dark/bright NSB runs.

IRF interpolation allows to extend slightly beyond the boundaries using the ---fuzzy_boundary parameter.

This pull request introduce IRF axes dependent -fuzzy_boundary parameters, with the motivation that the IRF dependence with zenith angle is much stronger than the one with pedvar (NSB). So there is good motivation to have a somewhat more relaxed fuzzy boundary for the NSB axes.

Instead of using --fuzzy_boundary 0.05, give now the tolerance per IRF axis: --fuzzy_boundary pedvar 0.10 --fuzzy_boundary zenith 0.05 (only those two axes are allowed).

This pull request also fixes a bug in the mean pedvar calculation (used for the IRF interpolation). For some runs, this is not filled correctly by anasum into the runSummary tree and we prefer now to calculate it from the values in the DL3 tree.

Note that pyV2DL3/eventdisplay/fillRESPONSE.py contains a lot of formatting changes (I've applied black, as the formatting was all over the place).