Skip to content

Noddy fix to try to prevent FPE in the RoiDescriptor constructor

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

Values of nan encoded in the bytestream for the data cause FPE during the RoiDescriptor constructor calls.

In principle, these such values should never have been produced, but they have been and now apparently a causing FPR in the reprocessing, although confusingly, didn't before.

Since these Roi parameters are garbage in this case, this request replaces them by standard float values with non-physical values.

This may well create problems downstream if the values ar ever used, so it is questionable whether we really want to do this. My preference would be to throw an exception, and then that could be caught downstream, but that is apparently unpopular for some reason, so rather than throwing our own exception, we either diable the throwing of the FPE exception, or as here, just convert the value to a valid float.

Quite possibly, may prevent https://its.cern.ch/jira/browse/ATR-22687

Although this silently masks the issue, which is not good practice, there seems to be limited clarity on what should be done.

Edited by Mark Sutton

Merge request reports