LabelMapperDict

class gwcs.selector.LabelMapperDict(inputs, mapper, inputs_mapping=None, atol=1e-08, name=None, **kwargs)[source]

Bases: gwcs.selector._LabelMapper

Maps a number to a transform, which when evaluated returns a label.

Use case: inverse transforms of an IFU. For an IFU observation, the keys are constant angles (corresponding to a slice) and values are transforms which return a slice number.

Parameters:
inputs : tuple of str

Names for the inputs, e.g. (‘alpha’, ‘beta’, lam’)

mapper : dict

Maps key values to transforms.

inputs_mapping : Mapping

An optional Mapping model to be prepended to the LabelMapper with the purpose to filter the inputs or change their order. It returns a number which is one of the keys of mapper.

atol : float

Absolute tolerance when comparing inputs to mapper.keys. It is passed to np.isclose.

name : str

The name of this transform.

Attributes Summary

atolfittableinputsThe name(s) of the input variable(s) on which a model is evaluated.linearoutputsstandard_broadcasting

Methods Summary

evaluate(*args)Evaluate the model on some input variables.

Attributes Documentation

atol
fittable = False
inputs

The name(s) of the input variable(s) on which a model is evaluated.

linear = False
outputs = ('labels',)
standard_broadcasting = False

Methods Documentation

evaluate(*args)[source]

Evaluate the model on some input variables.