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.
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.
- head in required
A fits header. String array
- a in required
List of sky x coordinates (alpha, lon). Scalar or vector
- d in required
List of sky y coordinates (dec, lat). Scalar or vector
- v in required
List of sky z coordinates (velocity, freq). Scalar or vector.
- ortho in optional
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.
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.
|Modifcation date:||Tue Jun 7 10:59:49 2011|