JelleAalbers / blueice

Build Likelihoods Using Efficient Interpolations and monte-Carlo generated Events
BSD 3-Clause "New" or "Revised" License
9 stars 9 forks source link

Allow negative rate multipliers #16

Closed kdund closed 4 years ago

kdund commented 7 years ago

It might be desirable to subtract two pdfs. (say, to avoid double-counting of a contaminant of a calibration source)

Proposed implementation: -with a suitable flag, allow a source rate_multiplier to be negative -if such a flag is set, truncate the summed pdf to be above 0.

kdund commented 7 years ago

The branch sourcesubstraction now contains a proposed solution. If a source has the property "allowed_negative" set to True, checks for negative rates are bypassed.

Note that in the current implementation, one relies on outlier_likelihood to be set, so that extended_loglikelihood truncates probabilities below zero. This seems slightly messy to me, I'll keep thinking about the alternatives.

JelleAalbers commented 6 years ago

I think this has been merged, right?

kdund commented 6 years ago

yes

kdund commented 4 years ago

âs such, close.