LabelMapperRange¶
-
class
gwcs.selector.
LabelMapperRange
(inputs, mapper, inputs_mapping=None, name=None, **kwargs)[source]¶ Bases:
gwcs.selector._LabelMapper
The structure this class uses maps a range of values to a transform. Given an input value it finds the range the value falls in and returns the corresponding transform. When evaluated the transform returns a label.
Example: Pick a transform based on wavelength range. For an IFU observation, the keys are (lambda_min, lambda_max) tuples and values are transforms which return a label corresponding to a slice.
Parameters: - inputs : tuple of str
Names for the inputs, e.g. (‘alpha’, ‘beta’, ‘lambda’)
- mapper : dict
Maps tuples of length 2 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.
- 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
fittable
inputs
The name(s) of the input variable(s) on which a model is evaluated.linear
outputs
standard_broadcasting
Methods Summary
evaluate
(*args)Evaluate the model on some input variables.Attributes Documentation
-
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