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
The number of axes in the pixel coordinate system.
A dictionary giving information on constructing high-level objects for the world coordinates.
A list with ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim elements giving information on constructing high-level objects for the world coordinates.
An iterable of strings describing the physical type for each world axis.
An iterable of strings given the units of the world coordinates for each axis.
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
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 imagei
is the row andj
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 imagei
is the row andj
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.