LinkFunctionRegistry¶
-
class
glue.config.LinkFunctionRegistry[source]¶ Bases:
glue.config.RegistryStores functions to convert between quantities
The members property is a list of (function, info_string, output_labels) namedtuples.
info_stringdescribes what the function does.output_labelsis a list of names for each output.categoryis a category in which the link function will appear (defaults to ‘General’).New link functions can be registered via
- @link_function(info=”maps degrees to arcseconds”,
output_labels=[‘arcsec’])
- def degrees2arcsec(degrees):
return degrees * 3600
Link functions are expected to receive and return numpy arrays
Methods Summary
__call__(self[, info, output_labels, category])This is provided so that registry instances can be used as decorators.
Methods Documentation