If I open a FITS file with python and inspect the value at coordinate (0,0) like so
from astropy.io import fits import sys import numpy from astropy.utils.data import download_file numpy.set_printoptions(threshold=sys.maxsize) image_file = download_file('http://data.astropy.org/tutorials/FITS-images/HorseHead.fits', cache=True ) data = fits.getdata(image_file) print(data)
It prints 7201. However when I open this file in ImageJ it says that the (0,0) coordinate is 5796 while the lower left coordinate is ~7201. I think this may be because FITS files are laid out with the 0th row on the bottom and built upwards from there.
Thus the image is “flipped” from what I expected in python (astropy). I suppose this is fine but a little confusing. However I think its actually a bug/issue because ImageJ actually labels (0,0) as the top left while displaying the last row. I think it should label it (0,810 - the height) if thats what it wants to do because its a FITS file.
Is this a bug/issue? Or am I misunderstanding.