You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
w = wcs.WCS(fits.Header.fromtextfile('test.hdr'))
w.to_header()
yields:
WCSAXES = 3 / Number of coordinate axes
CRPIX1 = 129.0 / Pixel coordinate of reference point
CRPIX2 = 129.0 / Pixel coordinate of reference point
CRPIX3 = 1.0 / Pixel coordinate of reference point
CDELT1 = -2.222222222222E-05 / [deg] Coordinate increment at reference point
CDELT2 = 2.222222222222E-05 / [deg] Coordinate increment at reference point
CDELT3 = 8.549244424438E+05 / [Hz] Coordinate increment at reference point
CUNIT1 = 'deg' / Units of coordinate increment and value
CUNIT2 = 'deg' / Units of coordinate increment and value
CUNIT3 = 'Hz' / Units of coordinate increment and value
CTYPE1 = 'RA---SIN' / Right ascension, orthographic/synthesis project
CTYPE2 = 'DEC--SIN' / Declination, orthographic/synthesis projection
CTYPE3 = 'FREQ' / Frequency (linear)
CRVAL1 = 240.9 / [deg] Coordinate value at reference point
CRVAL2 = -51.9 / [deg] Coordinate value at reference point
CRVAL3 = 256300022254.0 / [Hz] Coordinate value at reference point
PV2_1 = 0.0 / SIN projection parameter
PV2_2 = 0.0 / SIN projection parameter
LONPOLE = 180.0 / [deg] Native longitude of celestial pole
LATPOLE = -51.8626666667 / [deg] Native latitude of celestial pole
RESTFRQ = 256299900000.0 / [Hz] Line rest frequency
RADESYS = 'FK5' / Equatorial coordinate system
EQUINOX = 2000.0 / [yr] Equinox of equatorial coordinates
SPECSYS = 'LSRK' / Reference frame of spectral coordinates
OBSGEO-X= 2225142.18027 / [m] ITRF observatory X-coordinate
OBSGEO-Y= -5440307.37035 / [m] ITRF observatory Y-coordinate
OBSGEO-Z= -2481029.85187 / [m] ITRF observatory Z-coordinate
MJD-OBS = 57025.5985233 / [d] MJD of observation matching DATE-OBS
DATE-OBS= '2015-01-03T14:21:52.416000' / ISO-8601 observation date matching MJD-
Look at CRVAL: CRVAL1 = 2.409303333333E+02 to
CRVAL1 = 240.9
In [26]: w.to_header()['CRVAL1'] - w.wcs.crval[0]
Out[26]: -0.030333333300006871
probably related to #4555
wcs.to_header is dramatically truncating the celestial CRVAL in this header:
yields:
Look at CRVAL:
CRVAL1 = 2.409303333333E+02
toCRVAL1 = 240.9
Issue was originally identified from radio-astro-tools/spectral-cube#280
The text was updated successfully, but these errors were encountered: