gwcs.coordinate_frames.WorldAxisObjectComponent¶
- class gwcs.coordinate_frames.WorldAxisObjectComponent(name: str, position: str | int, property: str | Callable[[Any], str])¶
Bases:
NamedTupleA tuple to document the individual elements of the
world_axis_object_componentsof the WCS API.Notes
world_axis_object_componentswill return a list of tuples with each tuplebeing 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_classesin order to get numerical values.
- Parameters:
Create new instance of WorldAxisObjectComponent(name, position, property)
Attributes¶
Methods¶
|
Return number of occurrences of value. |
|
|
|
Return first index of value. |
- WorldAxisObjectComponent.count(value, /)¶
Return number of occurrences of value.
- classmethod WorldAxisObjectComponent.from_tuple(tup)¶
- WorldAxisObjectComponent.index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.