BaseAffineTransform#
- class astropy.coordinates.BaseAffineTransform(fromsys, tosys, priority=1, register_graph=None)[source]#
Bases:
CoordinateTransform
Base class for common functionality between the
AffineTransform
-type subclasses.This base class is needed because
AffineTransform
and the matrix transform classes share the__call__()
method, but differ in how they generate the affine parameters.StaticMatrixTransform
passes in a matrix stored as a class attribute, and both of the matrix transforms pass inNone
for the offset. Hence, user subclasses would likely want to subclass this (rather thanAffineTransform
) if they want to provide alternative transformations using this machinery.Methods Summary
__call__
(fromcoord, toframe)Does the actual coordinate transformation from the
fromsys
class to thetosys
class.Methods Documentation
- __call__(fromcoord, toframe)[source]#
Does the actual coordinate transformation from the
fromsys
class to thetosys
class.- Parameters:
- fromcoord
BaseCoordinateFrame
subclass instance An object of class matching
fromsys
that is to be transformed.- toframe
object
An object that has the attributes necessary to fully specify the frame. That is, it must have attributes with names that match the keys of the dictionary
tosys.frame_attributes
. Typically this is of classtosys
, but it might be some other class as long as it has the appropriate attributes.
- fromcoord
- Returns:
- tocoord
BaseCoordinateFrame
subclass instance The new coordinate after the transform has been applied.
- tocoord