WorldAxisObjectComponent

class gwcs.coordinate_frames.WorldAxisObjectComponent(name: str, position: str | int, property: str | Callable[[Any], str])[source]

Bases: NamedTuple

A tuple to document the individual elements of the world_axis_object_components of the WCS API.

Attributes:
namestr

Name for the world object this world array corresponds to, which must match the string names used in world_axis_object_classes. Note that names might appear twice because two world arrays might correspond to a single world object (e.g. a celestial coordinate might have both “ra” and “dec” arrays, which correspond to a single sky coordinate object.

positionstr | int

This is either a string keyword argument name or a positional index for the corresponding class from world_axis_object_classes.

property: str | Callable[[Any], str]

This is a string giving the name of the property to access on the corresponding class from world_axis_object_classes in order to get numerical values.

Notes

  • world_axis_object_components will return a list of tuples with each tuple

    being an instance of this class.

  • To stay consistent with the APE 14 API, users should not access the elements

    of this tuple via their names, but instead should access them via their position in the tuple.

Create new instance of WorldAxisObjectComponent(name, position, property)

Attributes Summary

name

Alias for field number 0

position

Alias for field number 1

property

Alias for field number 2

Methods Summary

from_tuple(tup)

Attributes Documentation

name: str

Alias for field number 0

position: str | int

Alias for field number 1

property: str | Callable[[Any], str]

Alias for field number 2

Methods Documentation

classmethod from_tuple(tup: tuple[str, str | int, str]) Self[source]