(Not so) Minor sampler refactoring of the samplers
This is the last of my series of MRs and builds on !199 (closed) and !200 (closed) and does a few things to simplify the samplers:
- I got rid of the redundant
external_samplerandexternal_sampler_functionattribute - All samplers now have a static dictionary with default kwargs for the sampler
- These dicts contain all possible kwargs
- The previously obsolete
_verify_kwargs_against_external_sampler_functionnow is called_verify_kwargs_against_default_kwargsand checks against our dict of kwargs - The kwargs property/setter now has a common template. Child classes only have to implement
_translate_kwargs, which handles incorrect kwargs. Most kwargs property/setters could therefore be removed - Introduced helper classes
MCSamplerand NestedSampler` - The methods to
setup_nburnandcalculate_autocorrelationhave been moved toMCSampler, since they don't really make sense outside of this right now - Some child classes implement an
__init__method now and have some custom attributes - Dynesty now handles the nested sampler (
sampler->self.sampler) as an attribute internally. This removes thesamplerargument in some of the internal methods - Emcee now has some properties that refer to the respective kwargs
- In case that the external sampler constructs a sampler object and then calls a sampler method, there are now
sampler_function_kwargsandsampler_init_kwargsproperties, that properly separate those.
Edited by Moritz Huebner