Skip to main content
`Ctrl`+`K`

# convert_between_array_and_pixel_axes

ndcube.utils.wcs.convert_between_array_and_pixel_axes(axis, naxes)

  Reflects axis index about center of number of axes.

  This is used to convert between array axes in numpy order and pixel axes in WCS order. Works in both directions.

  Parameters:

    - axis (`numpy.ndarray` of `int`) – The axis number(s) before reflection.

    - naxes (`int`) – The number of array axes.

  Returns:

    reflected_axis – The axis number(s) after reflection.

  Return type:

    `numpy.ndarray` of `int`