high_level_objects_to_values#
- astropy.wcs.wcsapi.high_level_objects_to_values(*world_objects, low_level_wcs)[source]#
Convert the input high level object to low level values.
This function uses the information in
low_level_wcs.world_axis_object_classesandlow_level_wcs.world_axis_object_componentsto convert the high level objects (such asSkyCoord) to low level “values” which should be scalars or Numpy arrays.This is used in
HighLevelWCSMixin.world_to_pixel, but provided as a separate function for use in other places where needed.- Parameters:
- *world_objects
SkyCoord,Quantity, etc. High level coordinate objects.
- low_level_wcs
BaseLowLevelWCSorobject Source of the world axis metadata to use for the conversion. A full
BaseLowLevelWCSinstance is accepted, but any object exposingworld_axis_object_classesandworld_axis_object_componentsattributes also works (for example atypes.SimpleNamespaceor a namedtuple). Theserialized_classesattribute is read if present and otherwise treated asFalse. This is useful when the metadata for the intended conversion direction does not match what a WCS exposes by default.
- *world_objects