37 #define G_PRJ_S2X "GWcsSTG::prj_s2x(int, int, int, int, double*, double*,"\
38 " double*, double*, int*)"
86 const double& crval1,
const double& crval2,
87 const double& crpix1,
const double& crpix2,
88 const double& cdelt1,
const double& cdelt2) :
89 GWcs(coords, crval1, crval2, crpix1, crpix2, cdelt1, cdelt2)
224 result.append(
"=== GWcsSTG ===");
305 m_w.push_back(1.0/
m_w[0]);
339 const double* x,
const double* y,
340 double* phi,
double* theta,
int* stat)
const
361 const double* xp = x;
363 int rowlen = nx * spt;
364 for (
int ix = 0; ix < nx; ++ix, rowoff += spt, xp += sxy) {
365 double xj = *xp +
m_x0;
366 double* phip = phi + rowoff;
367 for (
int iy = 0; iy < my; ++iy, phip += rowlen) {
373 const double* yp = y;
375 double* thetap = theta;
377 for (
int iy = 0; iy < ny; ++iy, yp += sxy) {
378 double yj = *yp +
m_y0;
380 for (
int ix = 0; ix < mx; ++ix, phip += spt, thetap += spt) {
423 const double* phi,
const double* theta,
424 double* x,
double* y,
int* stat)
const
449 const double* phip = phi;
451 int rowlen = nphi * sxy;
452 for (
int iphi = 0; iphi < nphi; ++iphi, rowoff += sxy, phip += spt) {
456 double* xp = x + rowoff;
457 double* yp = y + rowoff;
458 for (
int itheta = 0; itheta < mtheta; ++itheta) {
467 const double* thetap = theta;
471 for (
int itheta = 0; itheta < ntheta; ++itheta, thetap += spt) {
479 for (
int iphi = 0; iphi < mphi; ++iphi, xp += sxy, yp += sxy) {
492 for (
int iphi = 0; iphi < mphi; ++iphi, xp += sxy, yp += sxy) {
493 *xp = r*(*xp) -
m_x0;
494 *yp = -r*(*yp) -
m_y0;
void init_members(void)
Initialise class members.
Interface definition for the WCS registry class.
void prj_off(const double &phi0, const double &theta0) const
Compute fiducial offset to force (x,y) = (0,0) at (phi0,theta0)
void prj_x2s(int nx, int ny, int sxy, int spt, const double *x, const double *y, double *phi, double *theta, int *stat) const
Pixel-to-spherical deprojection.
void prj_s2x(int nphi, int ntheta, int spt, int sxy, const double *phi, const double *theta, double *x, double *y, int *stat) const
Generic spherical-to-pixel projection.
const GWcsSTG g_wcs_stg_seed
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
void prj_set(void) const
Setup of projection.
World Coordinate Projection registry class interface definition.
double atand(const double &value)
Compute arc tangens in degrees.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
void wcs_set(void) const
Setup of World Coordinate System.
GWcsSTG(void)
Void constructor.
void sincosd(const double &angle, double *s, double *c)
Compute sine and cosine of angle in degrees.
virtual GWcs & operator=(const GWcs &wcs)
Assignment operator.
double m_x0
Fiducial x offset.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print projection information.
std::string wcs_print(const GChatter &chatter=NORMAL) const
Print WCS information.
virtual ~GWcsSTG(void)
Destructor.
Stereographic (STG) projection class definition.
void free_members(void)
Delete class members.
std::vector< double > m_w
Intermediate values.
Abstract world coordinate system base class.
double m_y0
Fiducial y offset.
double atan2d(const double &y, const double &x)
Compute arc tangens in degrees.
void check_prj_s2x_status(const std::string &origin, const int &status, const int &number)
Checks status of GWcs::prj_s2x method.
double cosd(const double &angle)
Compute cosine of angle in degrees.
Exception handler interface definition.
bool m_prjset
Projection is set.
void init_members(void)
Initialise class members.
virtual void clear(void)
Clear projection.
GWcsSTG & operator=(const GWcsSTG &wcs)
Assignment operator.
void free_members(void)
Delete class members.
virtual GWcsSTG * clone(void) const
Clone projection.
double sind(const double &angle)
Compute sine of angle in degrees.
Stereographic (STG) projection class definition.
double m_r0
Radius of the generating sphere.
void copy_members(const GWcsSTG &wcs)
Copy class members.
Mathematical function definitions.