Content-type: text/html
coordStruct convertRaDec2Coords(flt8 pixSize, int nPix, flt8 *raDecArray, int ndra, flt8 *dra );
This function makes use of the astronomer's coordinate system of right ascension (ra) and declination (dec). Right ascension is a measure of longitudinal angle in degrees from 0 to 360 increasing counter clockwise (to the east) around the north pole. Declination is a measure of latitudinal angle in degrees from 90 at the north pole to -90 at the opposite (south) pole. This is converted into standard mathematical spherical coordinates theta and phi as follows:
theta = (90 - dec)*pi/180
phi = ra*pi/180
convertRaDec2Coords() takes an array of pixel positions in right ascension and declination coordinates and converts the positions into a coordStruct. This structure is used when calling both the forward and backward transform. The positions of the pixels within the array raDecArray must conform to the assumptions described in the pixelization subsection of the man page for ccSHT. The positions must also be ordered in a specific way. This ordering is important, as all pixel domain vectors used with ccSHT must also have this ordering. It is discussed briefly in the man page for ccSHT, but we will discuss it again here.
convertRaDec2Coords() assumes a sequential ordering for the pixels in the ra dec list. The ordering must conform to the following specification: two pixels which have the same declination and are contiguous on the sphere (or only separated by a gap in the pixelization) must be contiguous in the pixel ordering unless they are the first and last pixels listed for a particular value of declination. This specification does not completely determine an ordering for a pixelization, none the less, any ordering which is used must conform to the above specification.
The ordering of the ra dec array is the ordering of all pixel domain vectors used with the coordStruct produced by calling convertRaDec2Coords().
This function allocates memory to create the structure. To set all of the fields in the structure to zero and free up the memory associated with a structure created with converRaDec2Coords() pass a pointer to the structure to the function called destroyCoords(). For more information about this function see the man page for destroyCoords().
Below is a table describing the parameters passed to convertRaDec2Coords()
Copyright (C) 2003 Christopher M. Cantalupo
convertRaDec2Coords is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Christopher Cantalupo <cmc@nersc.gov>
Send bug reports or comments to the above address.
ccSHT(1), destroyCoords(1), forwardSHT(1), backwardSHT(1), forwardSHTmpi(1), backwardSHTmpi(1)