Fetch registration for database queries

gwemlightcurves.KNModels.io.model.get_model(data_format, data_class)[source]

Return the model() function for the given format

Parameters:

data_format : str

name of the format

data_class : type

the class that the model returns

Raises:

astropy.io.registry.IORegistryError

if not registration is found matching data_format

gwemlightcurves.KNModels.io.model.register_model(data_format, data_class, function, force=False, usage=None)[source]

Register a new method to EventTable.model() for a given format

Parameters:

data_format : str

name of the format to be registered

data_class : type

the class that the model returns

function : callable

the method to call from EventTable.model()

force : bool, optional

overwrite existing registration for data_format if found, default: False