Often we can end up with negative calibrated energies, e.g., in the first few bins if the calibration linear term is negative. These are clipped to zero by default in the new calibration module. However multiple zero edges will throw an error that the bin edges are not monotonically increasing.
One can normally change the clipping on the domain and range when doing calibrations manually, but not so with parsers, which automatically apply the calibration. One cannot change the clipping ranges passed into the calibration methods because the DEFAULT_DOMAIN etc are passed to those methods when the module is imported, not when the function is called.
We could either provide more kwargs to the parsers to prevent this, or allow negative energies (i.e., broaden or remove the clipping).
Often we can end up with negative calibrated energies, e.g., in the first few bins if the calibration linear term is negative. These are clipped to zero by default in the new calibration module. However multiple zero edges will throw an error that the bin edges are not monotonically increasing.
One can normally change the clipping on the domain and range when doing calibrations manually, but not so with parsers, which automatically apply the calibration. One cannot change the clipping ranges passed into the calibration methods because the
DEFAULT_DOMAIN
etc are passed to those methods when the module is imported, not when the function is called.We could either provide more kwargs to the parsers to prevent this, or allow negative energies (i.e., broaden or remove the clipping).