hierarchical.py: fixes to the add_data method of MassQuadrupoleDistribution
This MR contains a minor fix to hierarchical.py
so that if the MassQuadrupoleDistribution sample()
method is run more than once it does not duplicate and append KDEs each time.
However, more generally this MR can serve as a not about the commits 240e20df and 8dee8a5a, which just went straight into master that do some refactoring of MassQuadrupoleDistribution
- the setting of the likelihood (which entails generating the KDEs from the samples) now isn't performed until the sample
method is called. This allows add_data
to be called multiple times to add new data sets. It also:
- allows the number of samples held to be downsampled for both the "numerical" and "expectation" methods
- will reweight posterior samples to likelihood samples if required when using the "expectation" method
- removes the untested "sample" integration method.