BaseAffineTransform¶
- class astropy.coordinates.BaseAffineTransform(fromsys, tosys, priority=1, register_graph=None)[source]¶
Bases:
CoordinateTransformBase class for common functionality between the
AffineTransform-type subclasses.This base class is needed because
AffineTransformand the matrix transform classes share the__call__()method, but differ in how they generate the affine parameters.StaticMatrixTransformpasses in a matrix stored as a class attribute, and both of the matrix transforms pass inNonefor 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
fromsysclass to thetosysclass.Methods Documentation
- __call__(fromcoord, toframe)[source]¶
Does the actual coordinate transformation from the
fromsysclass to thetosysclass.- Parameters:
- fromcoord
BaseCoordinateFramesubclass instance An object of class matching
fromsysthat 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
BaseCoordinateFramesubclass instance The new coordinate after the transform has been applied.
- tocoord