Skip to content

Add protection again nan input ranges for the RoiDescriptor

Mark Sutton requested to merge sutt/athena:walter into master

In the past algorithms have often calculated parameters incorrectly as nan, and then tried to ceate RoiDescriptors with these parameters, so the RoiDescriptor has explicit protection agains such nan input and throws an exception.

However, this check is only on the central values - the asumption being that the ranges are sensible, and so they will only be nan if the central value is nan, so they do not need to be independently checked.

However, there is a case of an attempt to create an RoiDescriptorthe with nan ranges but with sensible central values, so now we add the range checks also to the limits of the Roi.

This is in response to https://its.cern.ch/jira/browse/ATR-22017, although it will not fix the problem, since the problem is most likely in the miscalculation upstream of the ranges themselves by some algorithm, so the RoiDescriptor can not fix this, and must throw an exception itself.

The ultimate fix, must be to identify the algorithm creating the problematic parameters in the first place, otherwise the processing for this event would need to be abandoned.

Edited by Mark Sutton

Merge request reports