astropy:docs

Rotation2D

class astropy.modeling.rotations.Rotation2D(angle=0.0)[source] [edit on github]

Bases: astropy.modeling.Model

Perform a 2D rotation given an angle in degrees.

Positive angles represent a counter-clockwise rotation and vice-versa.

Parameters:

angle : float

angle of rotation in deg

Attributes Summary

angle
n_inputs int(x[, base]) -> integer
n_outputs int(x[, base]) -> integer
param_names list() -> new empty list

Methods Summary

__call__(x, y) Apply the rotation 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 rotation.

Attributes Documentation

angle
n_inputs = 2
n_outputs = 2
param_names = ['angle']

Methods Documentation

__call__(x, y)[source] [edit on github]

Apply the rotation 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 rotation.

Page Contents