umami-hep / puma

puma - Plotting UMami Api
Apache License 2.0
4 stars 27 forks source link

Protect PUMA plots from input NaN values #219

Closed carloschiavi closed 10 months ago

carloschiavi commented 10 months ago

In the context of EFTracking studies, for some samples I seem to get NaN discriminants from time to time (1 or 2 jets in millions). The problem seems to be upstream (SALT evaluation - debugging still ongoing).

To be able to use the PUMA scripts, I needed to manually filter these cases. Would be nice to add some protection against this in PUMA, while issuing big WARNING messages.

The plan is to apply some filtering here, ignoring problematic jets.

dkobylianskii commented 10 months ago

Hi @carloschiavi ,

Thanks for the suggestion! It was implemented in #220. The Results class now has a remove_nan option that will filter all NaN values if enabled.

Best, Dmitrii