astropy:docs

AffineTransformation2D

class astropy.modeling.projections.AffineTransformation2D(matrix=[[1.0, 0.0], [0.0, 1.0]], translation=[0.0, 0.0])[source] [edit on github]

Bases: astropy.modeling.Model

Perform 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

matrix
n_inputs int(x[, base]) -> integer
n_outputs int(x[, base]) -> integer
param_names list() -> new empty list
standard_broadcasting bool(x) -> bool
translation

Methods Summary

__call__(*inputs, **kwargs) 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.
inverse() Inverse transformation.

Attributes Documentation

matrix
n_inputs = 2
n_outputs = 2
param_names = ['matrix', 'translation']
standard_broadcasting = False
translation

Methods Documentation

__call__(*inputs, **kwargs)[source] [edit on github]

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.

Parameters:

x, y : array, float

x and y coordinates

inverse()[source] [edit on github]

Inverse transformation.

Raises InputParameterError if the transformation cannot be inverted.

Page Contents