- craftutils.observation.epoch.SkyCoord.is_transformable_to(new_frame)
Determines if this coordinate frame can be transformed to another given frame.
Parameters¶
- new_frameframe class, frame object, or str
The proposed frame to transform into.
Returns¶
- transformablebool or str
True if this can be transformed to
new_frame, False if not, or the string ‘same’ ifnew_frameis the same system as this object but no transformation is defined.
Notes¶
A return value of ‘same’ means the transformation will work, but it will just give back a copy of this object. The intended usage is:
if coord.is_transformable_to(some_unknown_frame): coord2 = coord.transform_to(some_unknown_frame)This will work even if
some_unknown_frameturns out to be the same frame class ascoord. This is intended for cases where the frame is the same regardless of the frame attributes (e.g. ICRS), but be aware that it might also indicate that someone forgot to define the transformation between two objects of the same frame class but with different attributes.