On 12/06/12 18:04, Jenna Ryon wrote:

I'm trying to load a FITS image into Veusz to use as the background of a
scatterplot. The x and y axes are RA and Dec coordinates, respectively.
When I look at the FITS image in another program (ds9) the RA and Dec
coordinates match those of the xy coordinates in the plot, but when I
load the FITS into Veusz, the RA coordinates are shifted, and the length
of the image in the y direction (RA) has been compressed. I've attached
a screenshot of the plot - the background image should extend across the
whole plot if Veusz read the coordinates correctly (and the points are
supposed to line up with stars in the image). Any idea what's causing
this behavior?

Hi - unfortunately there isn't proper fits coordinate system in Veusz. All it does is to use the CRVAL1/2, CRPIX1/2, CDELT1/2 keywords to linearly calculate the coordinates for each pixel. It assumes the position of the pixel at CRPIX1,2 is CRVAL1,2 and the sizes of the pixels are CDELT1,2. This doesn't work with typical spherical coordinate systems used in fits, as you need to do the full geometry.

What Veusz should do is to use a WCS library to do the conversion properly. There are several available, so I'm not sure which should be used. pyast looks very large (10MB) and there are kapteyn and pywcs. There should be an option for which coordinate system to use too.

It doesn't end there, however, as if your image is too big it won't be possible to represent it with linear axes.

You may be able to work around it by fudging the above keywords in the files before loading into veusz. I should look at fixing this if possible...

Jeremy

_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à