CelestialFrame#

class gwcs.coordinate_frames.CelestialFrame(axes_order=None, reference_frame=None, unit=None, axes_names=None, name=None, axis_physical_types=None)[source]#

Bases: CoordinateFrame

Representation of a Celesital coordinate system.

This class has a native order of longitude then latitude, meaning axes_names, unit and axis_physical_types should be lon, lat ordered. If your transform is in a different order this should be specified with axes_order.

Parameters:
axes_ordertuple of int

A dimension in the input data that corresponds to this axis.

reference_frameastropy.coordinates.builtin_frames

A reference frame.

unitstr or units.Unit instance or iterable of those

Units on axes.

axes_nameslist

Names of the axes in this frame.

namestr

Name of this frame.

axis_physical_typeslist

The UCD 1+ physical types for the axes, in frame order (lon, lat).

Attributes Summary

axes_names

Names of axes in the frame.

axes_order

A tuple of indices which map inputs to axes.

axes_type

Type of this frame : 'SPATIAL', 'SPECTRAL', 'TIME'.

axis_physical_types

The axis physical types for this frame.

name

A custom name of this frame.

naxes

The number of axes in this frame.

reference_frame

Reference frame, used to convert to world coordinate objects.

serialized_classes

This property is used by the low level WCS API in Astropy.

unit

The unit of this frame.

world_axis_object_classes

The APE 14 object classes for this frame.

world_axis_object_components

The APE 14 object components for this frame.

Methods Summary

from_high_level_coordinates(*high_level_coords)

Convert high level coordinate objects to "values" as described by this frame.

to_high_level_coordinates(*values)

Convert "values" to high level coordinate objects described by this frame.

Attributes Documentation

axes_names#

Names of axes in the frame.

axes_order#

A tuple of indices which map inputs to axes.

axes_type#

Type of this frame : ‘SPATIAL’, ‘SPECTRAL’, ‘TIME’.

axis_physical_types#

The axis physical types for this frame.

These physical types are the types in frame order, not transform order.

name#

A custom name of this frame.

naxes#

The number of axes in this frame.

reference_frame#

Reference frame, used to convert to world coordinate objects.

serialized_classes#

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.

unit#

The unit of this frame.

world_axis_object_classes#
world_axis_object_components#

The APE 14 object components for this frame.

Methods Documentation

from_high_level_coordinates(*high_level_coords)#

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 SkyCoord or Quantity. See Shared Python Interface for World Coordinate Systems for details.

Parameters:
high_level_coordinates

One (or more) high level object describing the coordinate.

Returns:
valuesnumbers.Number or numpy.ndarray

naxis number of coordinates as scalars or arrays.

to_high_level_coordinates(*values)#

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 SkyCoord or Quantity. See Shared Python Interface for World Coordinate Systems for details.

Parameters:
valuesnumbers.Number, numpy.ndarray, or Quantity

naxis number of coordinates as scalars or arrays.

Returns:
high_level_coordinates

One (or more) high level object describing the coordinate.