[daip] simple FITS WCS question - creation of CD matrix
Joseph Postma
jpostma at ucalgary.ca
Tue Mar 5 13:43:02 EST 2019
Thanks for the reply Eric,
Do you have any contacts for anyone who knows more about the CD formalism and how to create and utilize it, etc.?
In section 7.3.1 of your FITS WCS paper 2<https://www.aanda.org/articles/aa/pdf/2002/45/aah3860.pdf>, the header interpretation example 1, it is implied that the CD matrix is created by fitting a transformation matrix between the deltas of pixel position of known objects (relative to the pixel reference) to those of the corresponding deltas of the sky coordinates of said objects (relative to sky coordinate reference).
That is, the CD matrix is created by fitting the 2D transformation required between pixel deltas and sky-coordinate deltas of known objects in the image.
After that, then the specified CTYPE equation is applied, for example for RA----TAN & DEC---TAN.
And so, it is implied that the creation of the CD matrix is independent of the projection used...which then implies that specifying the CTYPE is redundant or not necessary.
If this isn't a section you are familiar with, do you know who is? Is Calabretta still around?
I really appreciate your help!
Best regards,
Joe
Joseph E Postma
UVIT Calibration Specialist
Dept. of Physics & Astronomy
University of Calgary
SB604 2500 University Dr NW
Calgary, Alberta
Canada
T2N 1N4
jpostma at ucalgary.ca<mailto:jpostma at ucalgary.ca>
-----Original Message-----
From: Eric Greisen <egreisen at nrao.edu>
Sent: Monday, March 4, 2019 1:15 PM
To: Joseph Postma <jpostma at ucalgary.ca>
Cc: Denis Leahy <leahy at ucalgary.ca>; daip at nrao.edu
Subject: Re: simple FITS WCS question - creation of CD matrix
On 03/04/2019 11:25 AM, Joseph Postma wrote:
> Dear Eric,
>
> I would like some additional information as to how the CD matrix is
> supposed to be 1) created and 2) used for the different coordinate
> transformation (CTYPE) types.
>
> For a linear transformation, one simply has the CRPIX and CRVAL
> reference points of an identified source in the image, and then one
> forms the set of deltas in x/y and sky coordinates (say RA/Dec)
> relative to the reference given other sources with known positions in the image.
>
> Thus, one has a set of deltas in pixel x/y, and their corresponding
> deltas in RA/Dec. The CD matrix then transforms between these with
> scaling and rotation, and so one simply performs a least squares fit
> to determine the terms of the CD matrix. The CD matrix is thus
> created for a linear transformation, converting arbitrary pixel
> position deltas to sky coordinate deltas, which are then transformed
> to absolute sky coordinates by adding the sky reference CRVAL1/2.
>
>
> So this is simple for a linear transformation. Please confirm.
>
> How is the CD matrix created when the CTYPE is non-linear?
>
>
> At the first step, all we have are pixel coordinates of sources in x &
> y, and their corresponding sky coordinates in, say, RA & Dec. This is
> all of the information we have. In a linear transformation we convert
> directly from x/y to RA/Dec via the CD matrix with scaling and
> rotation and with the reference pixel values subtracted from the pixel
> coordinates during that transformation, then adding the reference sky
> values to that result.
>
>
> So given the limited information of two sets of corresponding
> coordinates, how is the CD matrix created and utilized when the
> transformation is non-linear, say, for Tangent plane projection?
To be honest, I have not had to think about these questions. The CDi_j (and PCi_j) are creations of folks from the optical community. In radio, we control the coordinates and so only use CDELTi and perhaps a rotation.
The issue for AIPS is to convert CDi_j on input into coordinates we understand - namely CDELTi and CROTAi. If the coordinates of your image are straightforward, the the CD matrix is a simple scale and rotate. It can contain skew and our software has a special task to re-image the input to remove the skew. That is all that the CD can do - it represents the change in physical coordinate wrt to pixel coordinate at the reference pixel. If the image is, for example, -TAN, then your fitting task will need to have extra math to take that into account whilst solving for the derivative of Ra/Dec at the chosen reference pixel.
There is a task in aips called XTRAN that attempts to fit for coordinates and re-grid or re-describe an image. Subroutine PCHDR tries to convert a CD matrix to a standard aips header (CDELT and CROTA).
Task DSKEW reads the CD matrix out of the history file and does a re-gridding to account for the skew and rotation.
AIPS is available lots of places - the main web site starts at www.aips.nrao.edu<http://www.aips.nrao.edu>.
Eric Greisen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/daip/attachments/20190305/857d272c/attachment.html>
More information about the Daip
mailing list