gwcs.coordinate_frames.CelestialFrame¶
- class gwcs.coordinate_frames.CelestialFrame(axes_order=None, reference_frame=None, unit=None, axes_names=None, name=None, axis_physical_types=None)¶
Bases:
CoordinateFrameRepresentation of a Celesital coordinate system.
This class has a native order of longitude then latitude, meaning
axes_names,unitandaxis_physical_typesshould be lon, lat ordered. If your transform is in a different order this should be specified withaxes_order.- Parameters:
axes_order (
tuple[int,...] |None, default:None) – A dimension in the input data that corresponds to this axis.reference_frame (
AstropyBuiltInFrame|None, default:None) – A reference frame.unit (
tuple[Unit,...] |None, default:None) – Units on axes.axes_names (
tuple[str,...] |None, default:None) – Names of the axes in this frame.axis_physical_types (
tuple[str|None,...] |None, default:None) – The UCD 1+ physical types for the axes, in frame order (lon, lat).
Attributes¶
Names of axes in the frame. |
|
A tuple of indices which map inputs to axes. |
|
Type of this frame, one of 'SPATIAL', 'SPECTRAL', 'TIME'. |
|
The axis physical types for this frame. |
|
A custom name of this frame. |
|
The number of axes in this frame. |
|
The raw FrameProperties object for this frame. |
|
Reference frame, used to convert to world coordinate objects. |
|
This property is used by the low level WCS API in Astropy. |
|
The unit of this frame. |
|
The APE 14 object classes for this frame. |
|
The APE 14 object components for this frame. |
- property CelestialFrame.axes_type: tuple[AxisType | str, ...]¶
Type of this frame, one of ‘SPATIAL’, ‘SPECTRAL’, ‘TIME’.
- property CelestialFrame.axis_physical_types: tuple[str | None, ...]¶
The axis physical types for this frame.
These physical types are the types in frame order, not transform order.
- property CelestialFrame.raw_properties: FrameProperties¶
The raw FrameProperties object for this frame.
- property CelestialFrame.reference_frame: AstropyBuiltInFrame | None¶
Reference frame, used to convert to world coordinate objects.
- property CelestialFrame.serialized_classes: bool¶
This property is used by the low level WCS API in Astropy.
By providing it we can duck type as a low level WCS object.
- property CelestialFrame.world_axis_object_classes: dict[str, WorldAxisObjectClass]¶
The APE 14 object classes for this frame.
- property CelestialFrame.world_axis_object_components: list[WorldAxisObjectComponent]¶
The APE 14 object components for this frame.
Methods¶
|
Add units to the arrays |
|
Convert high level coordinate objects to "values" as described by this frame. |
|
Return |
|
Remove units from the input arrays |
|
Convert "values" to high level coordinate objects described by this frame. |
- CelestialFrame.add_units(arrays)¶
Add units to the arrays
- Parameters:
arrays (
tuple[LowLevelInput,...] |LowLevelInput)- Return type:
- CelestialFrame.from_high_level_coordinates(*high_level_coords, correct_1d=True)¶
Convert high level coordinate objects to “values” as described by this frame.
“values” are the coordinates in array or scalar form, and high level objects are things such as
SkyCoordorQuantity. See Shared Python Interface for World Coordinate Systems for details.- Parameters:
high_level_coordinates – One (or more) high level object describing the coordinate.
- Returns:
values –
naxisnumber of coordinates as scalars or arrays.- Return type:
- CelestialFrame.is_high_level(*args)¶
Return
Trueif the input coordinates are already high level objects described by this frame.This is used by the low level WCS API in Astropy to determine whether to call
to_high_level_coordinatesor not.- Return type:
- CelestialFrame.remove_units(arrays)¶
Remove units from the input arrays
- Parameters:
arrays (
tuple[LowLevelInput,...] |LowLevelInput)- Return type:
- CelestialFrame.to_high_level_coordinates(*values, correct_1d=True)¶
Convert “values” to high level coordinate objects described by this frame.
“values” are the coordinates in array or scalar form, and high level objects are things such as
SkyCoordorQuantity. See Shared Python Interface for World Coordinate Systems for details.- Parameters:
values (
numbers.Number,numpy.ndarray, orQuantity) –naxisnumber of coordinates as scalars or arrays.- Returns:
high_level_coordinates – One (or more) high level object describing the coordinate.
- Return type: