Fetch registration for database queries
- cosmic.sample.sampler.sampler._update__doc__(data_class)
- cosmic.sample.sampler.sampler.get_sampler(data_format, data_class)
Return the
sampler()
function for the given format- Parameters:
- data_formatstr
name of the format
- data_classtype
the class that the sampler returns
- Raises:
- astropy.io.registry.IORegistryError
if not registration is found matching
data_format
- cosmic.sample.sampler.sampler.register_sampler(data_format, data_class, function, force=False, usage=None)
Register a new method to InitialBinaryTable.sampler() for a given format
- Parameters:
- data_formatstr
name of the format to be registered
- data_classtype
the class that the sampler returns
- functioncallable
the method to call from
InitialBinaryTable.sampler()
- forcebool, optional
overwrite existing registration for
data_format
if found, default: False