Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/people/mcalabre/WCS/wcslib/cel_8h.html
Дата изменения: Unknown Дата индексирования: Sun Apr 10 17:55:48 2016 Кодировка: Поисковые слова: р п р п р п р п р п р п р п р п |
WCSLIB
5.15
|
#include "prj.h"
Go to the source code of this file.
Data Structures | |
struct | celprm |
Celestial transformation parameters. More... | |
Macros | |
#define | CELLEN (sizeof(struct celprm)/sizeof(int)) |
Size of the celprm struct in int units. More... | |
#define | celini_errmsg cel_errmsg |
Deprecated. More... | |
#define | celprt_errmsg cel_errmsg |
Deprecated. More... | |
#define | celset_errmsg cel_errmsg |
Deprecated. More... | |
#define | celx2s_errmsg cel_errmsg |
Deprecated. More... | |
#define | cels2x_errmsg cel_errmsg |
Deprecated. More... | |
Enumerations | |
enum | cel_errmsg_enum { CELERR_SUCCESS = 0, CELERR_NULL_POINTER = 1, CELERR_BAD_PARAM = 2, CELERR_BAD_COORD_TRANS = 3, CELERR_ILL_COORD_TRANS = 4, CELERR_BAD_PIX = 5, CELERR_BAD_WORLD = 6 } |
Functions | |
int | celini (struct celprm *cel) |
Default constructor for the celprm struct. More... | |
int | celfree (struct celprm *cel) |
Destructor for the celprm struct. More... | |
int | celprt (const struct celprm *cel) |
Print routine for the celprm struct. More... | |
int | celperr (const struct celprm *cel, const char *prefix) |
int | celset (struct celprm *cel) |
Setup routine for the celprm struct. More... | |
int | celx2s (struct celprm *cel, int nx, int ny, int sxy, int sll, const double x[], const double y[], double phi[], double theta[], double lng[], double lat[], int stat[]) |
Pixel-to-world celestial transformation. More... | |
int | cels2x (struct celprm *cel, int nlng, int nlat, int sll, int sxy, const double lng[], const double lat[], double phi[], double theta[], double x[], double y[], int stat[]) |
World-to-pixel celestial transformation. More... | |
Variables | |
const char * | cel_errmsg [] |
Routines in this suite implement the part of the FITS World Coordinate System (WCS) standard that deals with celestial coordinates, as described in
These routines define methods to be used for computing celestial world coordinates from intermediate world coordinates (a linear transformation of image pixel coordinates), and vice versa. They are based on the celprm struct which contains all information needed for the computations. This struct contains some elements that must be set by the user, and others that are maintained by these routines, somewhat like a C++ class but with no encapsulation.
Routine celini() is provided to initialize the celprm struct with default values, celfree() reclaims any memory that may have been allocated to store an error message, and celprt() prints its contents.
celperr() prints the error message(s), if any, stored in a celprm struct and the prjprm struct that it contains.
A setup routine, celset(), computes intermediate values in the celprm struct from parameters in it that were supplied by the user. The struct always needs to be set up by celset() but it need not be called explicitly - refer to the explanation of celprm::flag.
celx2s() and cels2x() implement the WCS celestial coordinate transformations. In fact, they are high level driver routines for the lower level spherical coordinate rotation and projection routines described in sph.h and prj.h.
#define CELLEN (sizeof(struct celprm)/sizeof(int)) |
Size of the celprm struct in int units, used by the Fortran wrappers.
#define celini_errmsg cel_errmsg |
#define celprt_errmsg cel_errmsg |
#define celset_errmsg cel_errmsg |
#define celx2s_errmsg cel_errmsg |
#define cels2x_errmsg cel_errmsg |
enum cel_errmsg_enum |
int celini | ( | struct celprm * | cel | ) |
int celfree | ( | struct celprm * | cel | ) |
int celprt | ( | const struct celprm * | cel | ) |
celprt() prints the contents of a celprm struct using wcsprintf(). Mainly intended for diagnostic purposes.
[in] | cel | Celestial transformation parameters. |
celperr() - Print error messages from a celprm struct celperr() prints the error message(s), if any, stored in a celprm struct and the prjprm struct that it contains. If there are no errors then nothing is printed. It uses wcserr_prt(), q.v.
[in] | cel | Coordinate transformation parameters. |
[in] | prefix | If non-NULL, each output line will be prefixed with this string. |
int celperr | ( | const struct celprm * | cel, |
const char * | prefix | ||
) |
int celset | ( | struct celprm * | cel | ) |
celset() sets up a celprm struct according to information supplied within it.
Note that this routine need not be called directly; it will be invoked by celx2s() and cels2x() if celprm::flag is anything other than a predefined magic value.
[in,out] | cel | Celestial transformation parameters. |
int celx2s | ( | struct celprm * | cel, |
int | nx, | ||
int | ny, | ||
int | sxy, | ||
int | sll, | ||
const double | x[], | ||
const double | y[], | ||
double | phi[], | ||
double | theta[], | ||
double | lng[], | ||
double | lat[], | ||
int | stat[] | ||
) |
celx2s() transforms coordinates in the plane of projection to celestial coordinates .
[in,out] | cel | Celestial transformation parameters. |
[in] | nx,ny | Vector lengths. |
[in] | sxy,sll | Vector strides. |
[in] | x,y | Projected coordinates in pseudo "degrees". |
[out] | phi,theta | Longitude and latitude in the native coordinate system of the projection [deg]. |
[out] | lng,lat | Celestial longitude and latitude of the projected point [deg]. |
[out] | stat | Status return value for each vector element:
|
int cels2x | ( | struct celprm * | cel, |
int | nlng, | ||
int | nlat, | ||
int | sll, | ||
int | sxy, | ||
const double | lng[], | ||
const double | lat[], | ||
double | phi[], | ||
double | theta[], | ||
double | x[], | ||
double | y[], | ||
int | stat[] | ||
) |
cels2x() transforms celestial coordinates to coordinates in the plane of projection.
[in,out] | cel | Celestial transformation parameters. |
[in] | nlng,nlat | Vector lengths. |
[in] | sll,sxy | Vector strides. |
[in] | lng,lat | Celestial longitude and latitude of the projected point [deg]. |
[out] | phi,theta | Longitude and latitude in the native coordinate system of the projection [deg]. |
[out] | x,y | Projected coordinates in pseudo "degrees". |
[out] | stat | Status return value for each vector element:
|
const char* cel_errmsg[] |