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
- inputstuple of str
Names for the inputs, e.g. (‘alpha’, ‘beta’, ‘lambda’)
- mapperdict
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.
- atolfloat
Absolute tolerance when comparing inputs to
mapper.keys
. It is passed to np.isclose.- namestr
The name of this transform.
Attributes Summary
The name(s) of the input variable(s) on which a model is evaluated.
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¶
-
n_inputs
¶
-
n_outputs
= 1¶
-
standard_broadcasting
= False¶
Methods Documentation