Skip to content

wcs wavelength retrieval shifted by one pixel

Philip pointed out to me that the wcs retrieval of wavelengths might be off by one pixel. We narrowed the problem down to the definition of the CRPIXkeyword. We set it to 0 meaning to indicate the beginning of the array, but using the WCS.wcs_pix2world(pixels,0) method to retrieve the value yields a wavelength array with larger by CDELTthan we would expect.

We either need to set the CRPIX keyword to 1 or use 1 for the origin value of the retrieval method.

It is unclear which of these solutions should be preferred.

Links: