reproject
reproject copied to clipboard
Using reproject_from_healpix produces an array with 3 dimensions
Hi
I am using reproject_from_healpix with a Healpix map of hydrogen HI data (LAB_fullvel.fits), which is available at https://lambda.gsfc.nasa.gov/product/foreground/fg_LAB_HI_Survey_get.html Also the Fits header of the file is available on the same page.
I am trying to reproject part of the Healpix map into tangential projection, with RA and Dec coordinates. The Python program I used is at the end of this message. The program works without errors, but the array which the reproject_from_healpix produces has three dimensions, like (100,100,1024)
What is the reason for this, where is that axis with a length of 1024 coming from ?
As far as I understand, the Healpix data is not a data cube, having a third axis for velocity.
The Fits header has TFORM1 = '1024E ' / data format of field: 4-byte REAL Does this has something to do with the extra dimension with a length of 1024 ?
Thanks for any help, Kimmo Lehtinen
from astropy.io import fits from astropy.wcs import WCS from reproject import reproject_from_healpix
hdu = fits.open('LAB_fullvel.fits')[1]
target_header = fits.Header.fromstring(""" NAXIS = 2 NAXIS1 = 100 NAXIS2 = 100 CTYPE1 = 'RA---TAN' CRPIX1 = 50.5 CRVAL1 = 239.2 CDELT1 = -0.3 CUNIT1 = 'deg ' CTYPE2 = 'DEC--TAN' CRPIX2 = 50.5 CRVAL2 = -53.1 CDELT2 = 0.3 CUNIT2 = 'deg ' COORDSYS= 'icrs ' """, sep='\n')
data = hdu.data['TEMPERATURE']
array, footprint = reproject_from_healpix((data, 'G'), target_header, nested=False)