Coordinates#

class glue.core.coordinates.Coordinates(n_dim=None, pixel_n_dim=None, world_n_dim=None)[source]#

Bases: BaseLowLevelWCS

Base class for coordinate transformation

Attributes Summary

pixel_n_dim

The number of axes in the pixel coordinate system.

world_axis_object_classes

A dictionary giving information on constructing high-level objects for the world coordinates.

world_axis_object_components

A list with ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim elements giving information on constructing high-level objects for the world coordinates.

world_axis_physical_types

An iterable of strings describing the physical type for each world axis.

world_axis_units

An iterable of strings given the units of the world coordinates for each axis.

world_n_dim

The number of axes in the world coordinate system.

Methods Summary

array_index_to_world_values(*index_arrays)

Convert array indices to world coordinates.

world_to_array_index_values(*world_arrays)

Convert world coordinates to array indices.

Attributes Documentation

pixel_n_dim[source]#
world_axis_object_classes[source]#
world_axis_object_components[source]#
world_axis_physical_types[source]#
world_axis_units[source]#
world_n_dim[source]#

Methods Documentation

array_index_to_world_values(*index_arrays)[source]#

Convert array indices to world coordinates.

This is the same as ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_to_world_values except that the indices should be given in (i, j) order, where for an image i is the row and j is the column (i.e. the opposite order to ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_to_world_values).

If ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim is 1, this method returns a single scalar or array, otherwise a tuple of scalars or arrays is returned.

world_to_array_index_values(*world_arrays)[source]#

Convert world coordinates to array indices.

This is the same as ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_to_pixel_values except that the indices should be returned in (i, j) order, where for an image i is the row and j is the column (i.e. the opposite order to ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_to_world_values). The indices should be returned as rounded integers.

If ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_n_dim is 1, this method returns a single scalar or array, otherwise a tuple of scalars or arrays is returned.