AffineTransformation2D¶
-
class
astropy.modeling.projections.AffineTransformation2D(matrix=Parameter('matrix', value=[[1. 0.] [0. 1.]]), translation=Parameter('translation', value=[0. 0.]), **kwargs)[source]¶ Bases:
astropy.modeling.ModelPerform an affine transformation in 2 dimensions.
- Parameters
- matrixarray
A 2x2 matrix specifying the linear transformation to apply to the inputs
- translationarray
A 2D vector (given as either a 2x1 or 1x2 array) specifying a translation to apply to the inputs
Attributes Summary
This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or
Noneif any units are accepted).Methods Summary
__call__(*inputs[, model_set_axis, …])Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
evaluate(x, y, matrix, translation)Apply the transformation to a set of 2D Cartesian coordinates given as two lists–one for the x coordinates and one for a y coordinates–or a single coordinate pair.
Attributes Documentation
-
input_units¶
-
matrix= Parameter('matrix', value=[[1. 0.] [0. 1.]])¶
-
n_inputs= 2¶
-
n_outputs= 2¶
-
param_names= ('matrix', 'translation')¶
-
standard_broadcasting= False¶
-
translation= Parameter('translation', value=[0. 0.])¶
Methods Documentation
-
__call__(*inputs, model_set_axis=None, with_bounding_box=False, fill_value=nan, equivalencies=None, inputs_map=None, **new_inputs)¶ Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.