icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

Better KDE unit tests #706

Closed atrettin closed 2 years ago

atrettin commented 2 years ago

This PR adds unit testing for the "stashing" feature of the KDE to ensure that scaling stashed histograms with a subsequent weighting stage is strictly equivalent to scaling the weights first before applying the KDE. The behavior of errors is tested with both bootstrapped errors and errors set ad-hoc with the set_variance stage (the latter is aimed at backward compatibility with the verification sample).

The KDE unit test also uses a much faster testing pipeline now, reducing the runtime for this unit test from 20 s to ~1 s.

One further small tidbit is that I tracked down the origin of the UnitStrippedWarning one always gets when running the KDE stage and fixed the offending line. This has annoyed me for a long time.

philippeller commented 2 years ago

great, thank you!!