Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/sph_8h.html
Дата изменения: Unknown Дата индексирования: Sun Apr 10 17:56:12 2016 Кодировка: Поисковые слова: http astrokuban.info astrokuban |
WCSLIB
5.15
|
Go to the source code of this file.
Functions | |
int | sphx2s (const double eul[5], int nphi, int ntheta, int spt, int sxy, const double phi[], const double theta[], double lng[], double lat[]) |
Rotation in the pixel-to-world direction. More... | |
int | sphs2x (const double eul[5], int nlng, int nlat, int sll, int spt, const double lng[], const double lat[], double phi[], double theta[]) |
Rotation in the world-to-pixel direction. More... | |
int | sphdpa (int nfield, double lng0, double lat0, const double lng[], const double lat[], double dist[], double pa[]) |
Compute angular distance and position angle. More... | |
int | sphpad (int nfield, double lng0, double lat0, const double dist[], const double pa[], double lng[], double lat[]) |
Compute field points offset from a given point. More... | |
Routines in this suite implement the spherical coordinate transformations defined by the FITS World Coordinate System (WCS) standard
The transformations are implemented via separate functions, sphx2s() and sphs2x(), for the spherical rotation in each direction.
A utility function, sphdpa(), computes the angular distances and position angles from a given point on the sky to a number of other points. sphpad() does the complementary operation - computes the coordinates of points offset by the given angular distances and position angles from a given point on the sky.
int sphx2s | ( | const double | eul[5], |
int | nphi, | ||
int | ntheta, | ||
int | spt, | ||
int | sxy, | ||
const double | phi[], | ||
const double | theta[], | ||
double | lng[], | ||
double | lat[] | ||
) |
sphx2s() transforms native coordinates of a projection to celestial coordinates.
[in] | eul | Euler angles for the transformation:
|
[in] | nphi,ntheta | Vector lengths. |
[in] | spt,sxy | Vector strides. |
[in] | phi,theta | Longitude and latitude in the native coordinate system of the projection [deg]. |
[out] | lng,lat | Celestial longitude and latitude [deg]. These may refer to the same storage as phi and theta respectively. |
int sphs2x | ( | const double | eul[5], |
int | nlng, | ||
int | nlat, | ||
int | sll, | ||
int | spt, | ||
const double | lng[], | ||
const double | lat[], | ||
double | phi[], | ||
double | theta[] | ||
) |
sphs2x() transforms celestial coordinates to the native coordinates of a projection.
[in] | eul | Euler angles for the transformation:
|
[in] | nlng,nlat | Vector lengths. |
[in] | sll,spt | Vector strides. |
[in] | lng,lat | Celestial longitude and latitude [deg]. |
[out] | phi,theta | Longitude and latitude in the native coordinate system of the projection [deg]. These may refer to the same storage as lng and lat respectively. |
int sphdpa | ( | int | nfield, |
double | lng0, | ||
double | lat0, | ||
const double | lng[], | ||
const double | lat[], | ||
double | dist[], | ||
double | pa[] | ||
) |
sphdpa() computes the angular distance and generalized position angle (see notes) from a "reference" point to a number of "field" points on the sphere. The points must be specified consistently in any spherical coordinate system.
sphdpa() is complementary to sphpad().
[in] | nfield | The number of field points. |
[in] | lng0,lat0 | Spherical coordinates of the reference point [deg]. |
[in] | lng,lat | Spherical coordinates of the field points [deg]. |
[out] | dist,pa | Angular distances and position angles [deg]. These may refer to the same storage as lng and lat respectively. |
Notes:
sphdpa() uses sphs2x() to rotate coordinates so that the reference point is at the north pole of the new system with the north pole of the old system at zero longitude in the new. The Euler angles required by sphs2x() for this rotation are
The angular distance and generalized position angle are readily obtained from the longitude and latitude of the field point in the new system. This applies even if the reference point is at one of the poles, in which case the "position angle" returned is as would be computed for a reference point at or , in the limit as goes to zero.
It is evident that the coordinate system in which the two points are expressed is irrelevant to the determination of the angular separation between the points. However, this is not true of the generalized position angle.
The generalized position angle is here defined as the angle of intersection of the great circle containing the reference and field points with that containing the reference point and the pole. It has its normal meaning when the the reference and field points are specified in equatorial coordinates (right ascension and declination).
Interchanging the reference and field points changes the position angle in a non-intuitive way (because the sum of the angles of a spherical triangle normally exceeds ).
The position angle is undefined if the reference and field points are coincident or antipodal. This may be detected by checking for a distance of or (within rounding tolerance). sphdpa() will return an arbitrary position angle in such circumstances.
int sphpad | ( | int | nfield, |
double | lng0, | ||
double | lat0, | ||
const double | dist[], | ||
const double | pa[], | ||
double | lng[], | ||
double | lat[] | ||
) |
sphpad() computes the coordinates of a set of points that are offset by the specified angular distances and position angles from a given "reference" point on the sky. The distances and position angles must be specified consistently in any spherical coordinate system.
sphpad() is complementary to sphdpa().
[in] | nfield | The number of field points. |
[in] | lng0,lat0 | Spherical coordinates of the reference point [deg]. |
[in] | dist,pa | Angular distances and position angles [deg]. |
[out] | lng,lat | Spherical coordinates of the field points [deg]. These may refer to the same storage as dist and pa respectively. |
Notes:
sphpad() is implemented analogously to sphdpa() although using sphx2s() for the inverse transformation. In particular, when the reference point is at one of the poles, "position angle" is interpreted as though the reference point was at or , in the limit as goes to zero.
Applying sphpad() with the distances and position angles computed by sphdpa() should return the original field points.