Skip to content

Calibmap improvements

Reed Essick requested to merge calibmap-improvements into master

This patch adds prior odds into the pglitch calculus within CalibrationMap. This is done by "pre-computing" rate estimates whenver the quivers stored within the CalibrationMap are updated. Those rate estimates are used to compute priors for the sample being a glitch vs a clean. Note, we include normalizations based on the quivers' segments (rates) rather than just raw counts to allow for the possibility of different quiver sizes and durations during streaming evaluation. For batch jobs (or streaming jobs when the quivers' segments are identical), the normalization by livetime will cancel out and we effectively use the counts as priors (which is "correct" from the supervised learning standpoint). This should fix #76 (closed).

This patch also implements more flexibility when computing the calibration map's loglike cdf. Although functionally equivalent, this should allow us to resolve the cdf well (many monte carlo samples) without storing all of them (num_quantiles << num_mc). I also changed the nomenclature from num_mcmc to num_mc to make it clear that we're not doing a markov chain monte carlo. Should fix #68 (closed) (or at least improves the issue; CalibrationMaps may still be big-ish).

There is also a small change to catch all possible np.log(0) within the calculation of loglike_cdf. This fixes #78 (closed).

NOTE: this stuff has not been tested yet. The code compiles and unit-tests pass, but I'd like to put it through it's paces a bit more before merging it into master.

Edited by Reed Essick

Merge request reports