ADVXYZ Purpose
This procedure converts from (a,d,v) sky coordinates to (x,y,z)
pixel coordinates in a data cube. It is a wrapper to ad2xy in the
IDL Astronomy User's Library, which does not handle 3D data.
Inputs
head: A fits header. String array
a: List of sky x coordinates (alpha, lon). Scalar or vector
d: List of sky y coordinates (dec, lat). Scalar or vector
v: List of sky z coordinates (velocity, freq). Scalar or vector.
Keyword Parameters
ortho: Set this keyword if the third axis of the input coordinates
is orthogonal to the first two; that is, if adv describe a
cube, where a and d are constant across the cube. When this
is true, the computation can be performed more quickly.
Outputs
x: Pixel x coordinates. These are zero-indexed, IDL style.
y: Pixel y coordinates
z: Pizel z coordinates
Procedure
This function calls ad2xy, and hence can handle any wcs stuff that
that procedure can. The only restriction is that the fits header
have a simple description for transforming from v->z. That is,
CDELT3/CD3_3, CRPIX3, CRVAL3, keywords should completely define the
transformation. This is almost always the case.
Modification History
March 2010: Written by Chris Beaumont
May 2010: Fixed a bug in call to ad2xy. cnb.
Sep 2010: Fixed a bug when testing whether head is a string
array. cnb.
June 2011: Optimized for the case where a,d,v describe a cube with
a,d constant along slices. Added ortho keyword. cnb.