Using reproject_from_healpix produces an array with 3 dimensions
- Dominant language
- Python
- Stars
- 127
- Forks
- 74
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 2
Description
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)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the script from the issue body and inspect hdu.data['TEMPERATURE'] before calling reproject_from_healpix. Read the reproject_from_healpix entry point and the supplied FITS table metadata to trace the output shape. Done means establishing whether the 1024-length axis is expected and recording the explanation or a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100