[fitswcs] Long-slit spectroscopy WCS

Mark Calabretta Mark.Calabretta at atnf.CSIRO.AU
Mon Feb 4 23:47:02 EST 2002


On Mon 2002/02/04 11:16:47 -1000, "Malcolm J. Currie" wrote
in a message to: fitswcs at NRAO.EDU

Hi Malcolm,

>So the answer's yes.  (-:  Here the CDELTj are folded into the CD
>elements, whereas I was thinking in terms of the PCji matrix with
>CDELTj.  The question (in my mind but not clearly expressed) was more
>one of whether the CDELTj (j=2,3) or the PCji be scaled by the
>components of the position angle as above.

I think this is worth expanding upon in detail.  The original question
was

  "For an arbitrary position angle, is it merely a question of computing
   the components of the spatial increments along the slit, and assigning
   them to CDELT2 and CDELT3?

When using the CD matrix, as Frank explained, the third pixel coordinate
(p3) is always 1 and CRPIX3 = 1 so the (p3 - CRPIX3) term of Eq. 1 drops
out so the value of CD1_3, CD2_3 and CD3_3 are irrelevant.  The CD matrix
elements which need to be recorded are therefore CD1_1, CD2_2, and
CD3_2 - the others, including CD3_3, all default to zero in the IRAF
scheme which is fine here.

When using CDELT+PC, making the same assumption that the spectral and
spatial axes are orthogonal and p3 = CRPIX3 = 1, we get

   x1 = CDELT1 * PC1_1 * (p1 - CRPIX1)
   x2 = CDELT2 * PC2_2 * (p2 - CRPIX2)
   x3 = CDELT3 * PC3_2 * (p2 - CRPIX2)

Where -CDELT2 = CDELT3 = sigma is the spatial scale measured at the
reference point.  So you have a choice:

   a) Separately encode the rotation in the PCj_i matrix and the scale
      in the CDELTj.

      The cards which need to be recorded are therefore CDELT1, CDELT2,
      CDELT3, and PC1_1, PC2_2, PC3_2.  When omitted, PC3_3 defaults
      to unity (unlike CD3_3 which defaults to zero) and the other PC
      matrix elements default to zero which is fine here.

      I would call this the orthodox method; arguably it is clearer to
      human interpreters.

   b) Fold them together into the PCj_i and omit the CDELTj altogether
      (they default to unity), i.e. set

      PC1_1 = (whatever spectral dispersion)
      PC2_2 = -sigma * cos(PA)
      PC3_2 =  sigma * sin(PA)

      Only three matrix cards need to be recorded.  In this method
      PCj_i does the service of CDj_i and this is always possible, but
      note that the defaults for PCj_i differ from that of CDj_i
      (harmless here, but it was one of the reasons for resurrecting
      PCj_i).

   c) Fold them together into the CDELTj and omit the PCj_i altogether
      (it defaults to the unit matrix), i.e. set

      CDELT1 = (whatever spectral dispersion)
      CDELT2 = -sigma * cos(PA)
      CDELT3 =  sigma * sin(PA)

      Only the three CDELTj cards need be recorded.  This method has
      the advantage of making it look like an old-style header (sans
      CROTAj!) parsable by old, decrepit and perhaps unfixable software
      of which, apparently, there is no shortage.

So if this is what you meant by "yes", then yes, the answer is yes!

>  This general approach seemed
>to be the obvious method; it's one that would be easy to follow for the
>typical astronomer or programmer who doesn't know about projections and
>the nitty-gritty of co-ordinate systems.  There was also a nagging doubt
>that there was some better official alternative vindicated by Mark's
>response implying the LONGPOLE keyword.  Is either acceptable?

Paper I requires the CD matrix to be supported with the IRAF defaults
convention; I think "official" is a word best reserved for the use of
tabloid newspapers.

I used LONPOLE in the example because it was more in accord with the
context of Paper II particularly in demonstrating its use.

>Frank's notes and similar would be a useful addition to explain the
>examples presented in Paper III or IV.  From designing the Starlink
>NDF, I learnt that even programmers don't read the full documentation;
>they want annotated examples.  Something like our SGP/38 and now Paper
>II is somewhat intimidating.  Thus I urge the inclusion of examples
>for common arrangements.

Thus the detailed examples in Paper II.  However, I agree that header
construction example 3 might usefully be augmented with the above.

And the examples in Paper IV will be more intimidating, not less -
sorry but it's the nature of the problem.

>  Those with trickier WCS problems will have
>to read the small print or ask on fitsbits.

Sometimes I think I should quit my astronomy job and set up a
consultancy business!

Cheers, Mark





More information about the fitswcs mailing list