I am having an issue while working with fits files. The problem has to do with the wcs and the header of my file, and for information, the axes of my fits files are velocity and degrees.
The problem is that there is a discrepancy between what WCS says and what my header (which is correct) says.
In particular, if I do:
fits.open('file.fits')[0].header['CRVAL2']
, I get 6012.0, and for
fits.open('pv749290_gu.fits')[0].header['CDELT2']
, I get 4.0
So far so good. The problem arises when I do
w = WCS('file.fits')
, because I get:
CRVAL : 0.0 6012000.0
CDELT : 2.999833375699044 4000.0
So, as you can see the values that I originally had for CRVAL2 and CDELT2 are suddenly 3 orders of magnitude larger, and then this affects then plotting my image because I use "w" as a projection to plot my axes. Could someone help me to solve this problem? Thanks in advance!