gwcs.coordinate_frames.WorldAxisObjectComponent

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

Bases: NamedTuple

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

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.

Variables:
  • name – 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.

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

  • property – 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.

Parameters:

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

Parameters:

Attributes

name

Alias for field number 0

position

Alias for field number 1

property

Alias for field number 2

WorldAxisObjectComponent.name: str

Alias for field number 0

WorldAxisObjectComponent.position: str | int

Alias for field number 1

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

Alias for field number 2

Methods

count(value, /)

Return number of occurrences of value.

from_tuple(tup)

index(value[, start, stop])

Return first index of value.

WorldAxisObjectComponent.count(value, /)

Return number of occurrences of value.

classmethod WorldAxisObjectComponent.from_tuple(tup)
Parameters:

tup (tuple[str, str | int, str])

Return type:

Self

WorldAxisObjectComponent.index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.