AffineTransformation2D¶
-
class
astropy.modeling.projections.AffineTransformation2D(matrix=[[1.0, 0.0], [0.0, 1.0]], translation=[0.0, 0.0], **kwargs)[source]¶ Bases:
astropy.modeling.ModelPerform an affine transformation in 2 dimensions.
Parameters: - matrix : array
A 2x2 matrix specifying the linear transformation to apply to the inputs
- translation : array
A 2D vector (given as either a 2x1 or 1x2 array) specifying a translation to apply to the inputs
Attributes Summary
input_unitsThis 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).inputsmatrixoutputsparam_namesstandard_broadcastingtranslationMethods Summary
__call__(x, y[, 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¶ 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).Model sub-classes can also use function annotations in evaluate to indicate valid input units, in which case this property should not be overridden since it will return the input units based on the annotations.
-
inputs= ('x', 'y')¶
-
matrix= Parameter('matrix', value=[[1. 0.] [0. 1.]])¶
-
outputs= ('x', 'y')¶
-
param_names= ('matrix', 'translation')¶
-
standard_broadcasting= False¶
-
translation= Parameter('translation', value=[0. 0.])¶
Methods Documentation
-
__call__(x, y, model_set_axis=None, with_bounding_box=False, fill_value=nan, equivalencies=None, inputs_map=None)¶ Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.