RegionsSelector¶
-
class
gwcs.selector.
RegionsSelector
(inputs, outputs, selector, label_mapper, undefined_transform_value=nan, name=None, **kwargs)[source]¶ Bases:
astropy.modeling.Model
This model defines discontinuous transforms. It maps inputs to their corresponding transforms. It uses an instance of
_LabelMapper
as a proxy to map inputs to the correct region.Parameters: - inputs : list of str
Names of the inputs.
- outputs : list of str
Names of the outputs.
- selector : dict
Mapping of region labels to transforms. Labels can be of type int or str, transforms are of type
Model
.- label_mapper : a subclass of
_LabelMapper
A model which maps locations to region labels.
- undefined_transform_value : float, np.nan (default)
Value to be returned if there’s no transform defined for the inputs.
- 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
The name(s) of the output(s) of the model.selector
standard_broadcasting
undefined_transform_value
Methods Summary
evaluate
(*args)Parameters: set_input
(rid)Sets one of the inputs and returns a transform associated with it.Attributes Documentation
-
fittable
= False¶
-
inputs
¶ The name(s) of the input variable(s) on which a model is evaluated.
-
linear
= False¶
-
outputs
¶ The name(s) of the output(s) of the model.
-
selector
¶
-
standard_broadcasting
= False¶
-
undefined_transform_value
¶
Methods Documentation