ndcube.utils.wcs.get_dependent_data_axes(wcs_object, data_axis, missing_axes)[source] [edit on github]

Given a data axis index, return indices of dependent data axes.

Both input and output axis indices are in the numpy ordering convention (reverse of WCS ordering convention). The returned axis indices include the input axis. Returned axis indices do NOT include any WCS axes that do not have a corresponding data axis, i.e. “missing” axes.

  • wcs_object (astropy.wcs.WCS or ndcube.utils.wcs.WCS) – The WCS object describing the axes.

  • data_axis (int) – Index of axis (in numpy ordering convention) for which dependent axes are desired.

  • missing_axes (iterable of bool) – Indicates which axes of the WCS are “missing”, i.e. do not correspond to a data axis.


dependent_data_axes (tuple of int) – Sorted indices of axes dependent on input data_axis in numpy ordering convention.