I am having a problem, with python, pyfits and numpy. I am opening a fits file with the usual
file = pyfits.open('file.fits', memap = True)
when calling
file.info()
It shows me, that the dataset contained has the shape (2,1024,1024,546):
No. Name Type Cards Dimensions Format
0 PRIMARY PrimaryHDU 12 (2, 1024, 1024, 546) float32
then, I go ahead and import this array into a numpy array via
data = file[0].data
when I then want to show the shape of this array, using
print (data.shape)
it shows the shape
(546,1024,1024,2)
I have no Idea, why it is doing so. It is important to know which dimension belongs to which axis.
Any help is appreciated! Thank you very much.