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 describes what the function does. output_labels is a list of names for each output. category is a category in which the link funtion 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 degress * 3600

Link functions are expected to receive and return numpy arrays

Methods Summary

__call__([info, output_labels, category])

Methods Documentation

__call__(info='', output_labels=None, category='General')[source]