IdentityCoordinates

class glue.core.coordinates.IdentityCoordinates(n_dim=None)[source]

Bases: glue.core.coordinates.Coordinates

Attributes Summary

axis_correlation_matrix

Returns an (~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim, ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_n_dim) matrix that indicates using booleans whether a given world coordinate depends on a given pixel coordinate.

Methods Summary

pixel_to_world_values(*pixel)

Convert pixel coordinates to world coordinates.

world_to_pixel_values(*world)

Convert world coordinates to pixel coordinates.

Attributes Documentation

axis_correlation_matrix[source]

Methods Documentation

pixel_to_world_values(*pixel)[source]

Convert pixel coordinates to world coordinates.

This method takes ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_n_dim scalars or arrays as input, and pixel coordinates should be zero-based. Returns ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim scalars or arrays in units given by ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_axis_units. Note that pixel coordinates are assumed to be 0 at the center of the first pixel in each dimension. If a pixel is in a region where the WCS is not defined, NaN can be returned. The coordinates should be specified in the (x, y) order, where for an image, x is the horizontal coordinate and y is the vertical coordinate.

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_pixel_values(*world)[source]

Convert world coordinates to pixel coordinates.

This method takes ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_n_dim scalars or arrays as input in units given by ~astropy.wcs.wcsapi.BaseLowLevelWCS.world_axis_units. Returns ~astropy.wcs.wcsapi.BaseLowLevelWCS.pixel_n_dim scalars or arrays. Note that pixel coordinates are assumed to be 0 at the center of the first pixel in each dimension. If a world coordinate does not have a matching pixel coordinate, NaN can be returned. The coordinates should be returned in the (x, y) order, where for an image, x is the horizontal coordinate and y is the vertical coordinate.

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.