class glue.config.LinkHelperRegistry[source]

Bases: glue.config.Registry

Stores helper objects that compute many ComponentLinks at once

The members property is a list of (object, info_string, input_labels) tuples. Object is the link helper. info_string describes what object does. input_labels is a list labeling the inputs. category is a category in which the link funtion will appear (defaults to ‘General’).

Each link helper takes a list of ComponentIDs as inputs, and returns an iterable object (e.g. list) of ComponentLinks.

New helpers can be registered via

@link_helper(‘Links degrees and arcseconds in both directions’,
[‘degree’, ‘arcsecond’])
def new_helper(degree, arcsecond):
return [ComponentLink([degree], arcsecond, using=lambda d: d*3600),
ComponentLink([arcsecond], degree, using=lambda a: a/3600)]

Methods Summary

__call__(info, input_labels[, category])

Methods Documentation

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