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_classes and low_level_wcs.world_axis_object_components to convert the high level objects (such as SkyCoord) 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_objectsSkyCoord, Quantity, etc.

High level coordinate objects.

low_level_wcsBaseLowLevelWCS or object

Source of the world axis metadata to use for the conversion. A full BaseLowLevelWCS instance is accepted, but any object exposing world_axis_object_classes and world_axis_object_components attributes also works (for example a types.SimpleNamespace or a namedtuple). The serialized_classes attribute is read if present and otherwise treated as False. This is useful when the metadata for the intended conversion direction does not match what a WCS exposes by default.