Bases: astropy.modeling._compound_deprecated._CompositeModel
Deprecated since version 1.0: The SerialCompositeModel class is deprecated and may be removed in a future version. Use Compound Models as described in the Astropy documentation instead.
Composite model that evaluates models in series.
Parameters: | transforms : list
inmap : list of lists or None
outmap : list or None
n_inputs : int
n_outputs : int
|
---|
Notes
Output values of one model are used as input values of another. Obviously the order of the models matters.
Examples
Apply a 2D rotation followed by a shift in x and y:
>>> import numpy as np
>>> from astropy.modeling import models, LabeledInput, SerialCompositeModel
>>> y, x = np.mgrid[:5, :5]
>>> rotation = models.Rotation2D(angle=23.5)
>>> offset_x = models.Shift(-4.23)
>>> offset_y = models.Shift(2)
>>> labeled_input = LabeledInput([x, y], ["x", "y"])
>>> transform = SerialCompositeModel([rotation, offset_x, offset_y],
... inmap=[['x', 'y'], ['x'], ['y']],
... outmap=[['x', 'y'], ['x'], ['y']])
>>> result = transform(labeled_input)
Deprecated since version 1.0: The SerialCompositeModel class is deprecated and may be removed in a future version. Use Compound Models as described in the Astropy documentation instead.
x.__init__(...) initializes x; see help(type(x)) for signature
Attributes Summary
inverse |
Attributes Documentation