EmptyFrame¶
- class gwcs.coordinate_frames.EmptyFrame(name: str | None = None, naxes: int | None = None)[source]¶
Bases:
CoordinateFrameProtocolRepresents a “default” detector frame. This is for use as the default value for input frame by the WCS object.
Attributes Summary
Names describing the axes of the frame.
The position of the axes in the frame in the transform.
An upcase string (or tuple of strings) describing the type of the axis.
The UCD 1+ physical types for the axes, in frame order.
A custom name of this frame.
The number of axes described by this frame.
The reference frame of the coordinates described by this frame.
The units of the axes in this frame.
The APE 14 object classes for this frame.
The APE 14 object components for this frame.
Methods Summary
add_units(arrays)Add units to the arrays
from_high_level_coordinates(*high_level_coords)Convert high level coordinate objects to "values" as described by this frame.
from_transform([name, transform])Class method constructor to allow for an EmptyFrame to be created using data from a transform.
remove_units(arrays)Remove units from the input arrays
to_high_level_coordinates(*values)Convert "values" to high level coordinate objects described by this frame.
Attributes Documentation
- axes_names¶
- axes_order¶
- axes_type¶
- axis_physical_types¶
- name¶
A custom name of this frame.
- naxes¶
- reference_frame¶
- unit¶
- world_axis_object_classes¶
- world_axis_object_components¶
Methods Documentation
- add_units(arrays: tuple[ndarray[tuple[Any, ...], dtype[generic]] | Quantity, ...] | ndarray[tuple[Any, ...], dtype[generic]] | Quantity) tuple[ndarray[tuple[Any, ...], dtype[generic]] | Quantity, ...][source]¶
Add units to the arrays
- from_high_level_coordinates(*high_level_coords)[source]¶
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
numbers.Numberornumpy.ndarray naxisnumber of coordinates as scalars or arrays.
- values
- classmethod from_transform(name: str | None = None, transform: Model | None = None) Self[source]¶
Class method constructor to allow for an EmptyFrame to be created using data from a transform.
- Parameters:
- namestr or None
Name of the frame. If None, defaults to “detector”.
- transformastropy.modeling.Model or None
A transform from this step’s frame to next step’s frame. The transform of the last step should be None.
- Returns:
- EmptyFrame
An EmptyFrame object with the number of axes set based on the transform.
Notes
- This assumes that the number of inputs to the transform corresponds to the
number of axes in the frame. Therefore, this assumes that there are NO non-coordinate inputs present.
- remove_units(arrays: tuple[ndarray[tuple[Any, ...], dtype[generic]] | Quantity, ...] | ndarray[tuple[Any, ...], dtype[generic]] | Quantity) tuple[ndarray[tuple[Any, ...], dtype[generic]] | Quantity, ...][source]¶
Remove units from the input arrays
- to_high_level_coordinates(*values)[source]¶
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.
- values
- Returns:
- high_level_coordinates
One (or more) high level object describing the coordinate.