get_dependent_pixel_axes#

ndcube.utils.wcs.get_dependent_pixel_axes(pixel_axis, axis_correlation_matrix)[source]#

Find indices of all pixel axes associated with the world axes linked to the input pixel axis.

For example, say the input pixel axis is 0 and it is associated with two world axes corresponding to longitude and latitude. Let’s also say that pixel axis 1 is also associated with longitude and latitude. Thus, this function would return pixel axes 0 and 1. On the other hand let’s say pixel axis 2 is associated with only one world axis, e.g. wavelength, which does not depend on any other pixel axis (i.e. it is independent). In that case this function would only return pixel axis 2. Both input and output pixel axis indices are in the WCS ordering convention (reverse of numpy ordering convention). The returned axis indices include the input axis.

Parameters:
Returns:

dependent_pixel_axes (numpy.ndarray of int) – Sorted indices of pixel axes dependent on input axis in WCS ordering convention.