ndcube.utils.wcs.get_dependent_array_axes(array_axis, axis_correlation_matrix)[source]#

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

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


dependent_array_axes (numpy.ndarray of int) – Sorted indices of array axes dependent on input axis in numpy ordering convention.