# 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
inputstuple of str

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

mapperdict

Maps key values to transforms.

inputs_mappingMapping

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.

atolfloat

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

namestr

The name of this transform.

Attributes Summary

 atol fittable inputs The name(s) of the input variable(s) on which a model is evaluated. linear n_inputs n_outputs standard_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
n_inputs
n_outputs = 1
standard_broadcasting = False

Methods Documentation

evaluate(*args)[source]

Evaluate the model on some input variables.