LinkFunctionRegistry¶
-
class
glue.config.
LinkFunctionRegistry
[source]¶ Bases:
glue.config.Registry
Stores functions to convert between quantities
The members properety is a list of (function, info_string, output_labels) namedtuples. info_string is describes what the function does. output_labels is a list of names for each output.
New link functions can be registered via
- @link_function(info=”maps degrees to arcseconds”,
- output_labels=[‘arcsec’])
- def degrees2arcsec(degrees):
- return degress * 3600
Link functions are expected to receive and return numpy arrays
Methods Summary
__call__
([info, output_labels])default_members
()Methods Documentation