View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

MWCS for long-slit data

Phil Hodge wrote on Mar 27, 2000

I'm trying to improve the world coordinate description for long-slit
data.  I've put these coordinate parameters into an image header:

CRPIX1 = 601.
CRPIX2 = 601.
CRVAL1 = 140.328979195
CRVAL2 = 81.72458680682
CRVAL3 = 1374.
CTYPE1 = 'RA---TAN'
CTYPE2 = 'DEC--TAN'
CTYPE3 = 'LAMBDA  '
CD1_1 = 0.
CD1_2 = -6.7168965587042E-7
CD2_1 = 0.
CD2_2 = -1.3872637369075E-5
CD3_1 = 1.374
CD3_2 = 0.
CUNIT1 = 'deg     '
CUNIT2 = 'deg     '
CUNIT3 = 'angstrom'
WCSDIM = 3

These can be used in a straightforward way to convert from pixel
coordinates (x,y) to degrees in the tangent plane and wavelength:

	dx = (x - crpix1)
	dy = (y - crpix2)

	l = cd1_1 * dx + cd1_2 * dy             = cd1_2 * dy
	m = cd2_1 * dx + cd2_2 * dy             = cd2_2 * dy
	wl = cd3_1 * dx + cd3_2 * dy + crval3   = cd3_1 * dx + crval3

(l,m) can then be converted to right ascension and declination using
tangent projection at (crval1,crval2).

MWCS doesn't seem to be able to handle these parameters.  I can see that
converting back from ra, dec, wavelength to pixel coordinates would not
be straightforward, since half the CD matrix elements are zero, but I
would expect the conversion from logical to world coordinates to work
correctly.  I suppose the problem is because MWCS "compiles" the
transformation when it's opened, and the ra & dec portion of the CD
matrix is singular.  Is there a better way to define the coordinate
transformation, or is there something else I can do so that MWCS will
be able to work with these parameters?

Phil

Last post on Mar 27, 2000