Open astrofrog opened 6 years ago
This is a feature, not a bug. It is the question of C-order vs Fortran-order. Python is basically C-order, although it supports Fortran-order by defining the strides correctly. However, that lets Python do a transpose of the image cube when doing something with the data. It has been discussed with the CASA group. However, they preferred the Fortran order (as it is in the C++ layer), but python-casacore chose to swap the axes, so it becomes C-order.
So In python-casacore (and mostly also in TaQL) the first axis varies slowest.
I am trying to read in the following image with python-casacore:
https://www.dropbox.com/s/91lx6apur3xq2y0/example_cube.image.tgz?dl=0
The order of the axes should be [RA, Dec, Freq, Stokes] (or [Stokes, Freq, Dec, RA]), and this works in CASA itself:
However python-casacore returns neither order, instead swapping Stokes and Frequency:
Is this a bug? If not, is there a way to get the axes in the same order as the actual data?