CompoundLowLevelWCS#
- class ndcube.wcs.wrappers.CompoundLowLevelWCS(*wcs, mapping=None, pixel_atol=1e-08)[source]#
- Bases: - BaseWCSWrapper- A wrapper that takes multiple low level WCS objects and makes a compound WCS that combines them. - Parameters:
- *wcs ( - BaseLowLevelWCS) – The WCSes to combine
- mapping ( - tuple) – The pixel dimension mapping between the input pixel dimensions and the input pixel dimensions to the underlying WCSes. This should have length equal to the total number of pixel dimensions in all input WCSes and have a maximum of the number of input pixel dimensions to the resulting compound WCS -1 (counts from 0). For example- (0, 1, 2, 1)would end up with the second and fourth pixel dimensions in the input WCSes being shared, so the compound WCS would have 3 pixel dimensions- (2 + 1). See Advanced mappings for more examples of this input format.
- pixel_atol ( - float) – A tolerance used to check that the resulting pixel coordinates from- world_to_pixelare the same from all WCSes.
 
 - Attributes Summary - Returns an ( - world_n_dim,- pixel_n_dim) matrix that indicates using booleans whether a given world coordinate depends on a given pixel coordinate.- An iterable of strings describing the name for each pixel axis. - The bounds (in pixel coordinates) inside which the WCS is defined, as a list with - pixel_n_dim- (min, max)tuples.- The number of axes in the pixel coordinate system. - The shape of the data that the WCS applies to as a tuple of length - pixel_n_dimin- (x, y)order (where for an image,- xis the horizontal coordinate and- yis the vertical coordinate).- Indicates whether Python objects are given in serialized form or as actual Python objects. - An iterable of strings describing the name for each world axis. - A dictionary giving information on constructing high-level objects for the world coordinates. - A list with - world_n_dimelements 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 - pixel_to_world_values(*pixel_arrays)- Convert pixel coordinates to world coordinates. - world_to_pixel_values(*world_arrays)- Convert world coordinates to pixel coordinates. - Attributes Documentation - axis_correlation_matrix#
 - pixel_axis_names#
 - pixel_bounds#
 - pixel_n_dim#
 - pixel_shape#
 - serialized_classes#
 - world_axis_names#
 - world_axis_object_classes#
 - world_axis_object_components#
 - world_axis_physical_types#
 - world_axis_units#
 - world_n_dim#
 - Methods Documentation - pixel_to_world_values(*pixel_arrays)[source]#
- Convert pixel coordinates to world coordinates. - This method takes - pixel_n_dimscalars or arrays as input, and pixel coordinates should be zero-based. Returns- world_n_dimscalars or arrays in units given by- 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 should be returned. The coordinates should be specified in the- (x, y)order, where for an image,- xis the horizontal coordinate and- yis the vertical coordinate.- If - world_n_dimis- 1, this method returns a single scalar or array, otherwise a tuple of scalars or arrays is returned.
 - world_to_pixel_values(*world_arrays)[source]#
- Convert world coordinates to pixel coordinates. - This method takes - world_n_dimscalars or arrays as input in units given by- world_axis_units. Returns- pixel_n_dimscalars 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 should be returned. The coordinates should be returned in the- (x, y)order, where for an image,- xis the horizontal coordinate and- yis the vertical coordinate.- If - pixel_n_dimis- 1, this method returns a single scalar or array, otherwise a tuple of scalars or arrays is returned.
 
