37 #define G_PRJ_S2X "GWcsTAN::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(
"=== GWcsTAN ===");
335 const double* x,
const double* y,
336 double* phi,
double* theta,
int* stat)
const
357 const double* xp = x;
359 int rowlen = nx * spt;
360 for (
int ix = 0; ix < nx; ++ix, rowoff += spt, xp += sxy) {
361 double xj = *xp +
m_x0;
362 double* phip = phi + rowoff;
363 for (
int iy = 0; iy < my; ++iy, phip += rowlen) {
369 const double* yp = y;
371 double* thetap = theta;
373 for (
int iy = 0; iy < ny; ++iy, yp += sxy) {
374 double yj = *yp +
m_y0;
376 for (
int ix = 0; ix < mx; ++ix, phip += spt, thetap += spt) {
419 const double* phi,
const double* theta,
420 double* x,
double* y,
int* stat)
const
445 const double* phip = phi;
447 int rowlen = nphi * sxy;
448 for (
int iphi = 0; iphi < nphi; ++iphi, rowoff += sxy, phip += spt) {
452 double* xp = x + rowoff;
453 double* yp = y + rowoff;
454 for (
int itheta = 0; itheta < mtheta; ++itheta) {
463 const double* thetap = theta;
467 for (
int itheta = 0; itheta < ntheta; ++itheta, thetap += spt) {
475 for (
int iphi = 0; iphi < mphi; ++iphi, xp += sxy, yp += sxy) {
494 for (
int iphi = 0; iphi < mphi; ++iphi, xp += sxy, yp += sxy) {
495 *xp = r*(*xp) -
m_x0;
496 *yp = -r*(*yp) -
m_y0;
void init_members(void)
Initialise class members.
Interface definition for the WCS registry class.
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.
void prj_off(const double &phi0, const double &theta0) const
Compute fiducial offset to force (x,y) = (0,0) at (phi0,theta0)
GWcsTAN & operator=(const GWcsTAN &wcs)
Assignment operator.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
const GWcsTAN g_wcs_tan_seed
GWcsTAN(void)
Void constructor.
World Coordinate Projection registry class interface definition.
virtual GWcsTAN * clone(void) const
Clone gnomonic projection.
void prj_set(void) const
Setup of projection.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
void wcs_set(void) const
Setup of World Coordinate System.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print gnomonic projection information.
void free_members(void)
Delete class members.
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.
virtual ~GWcsTAN(void)
Destructor.
double m_x0
Fiducial x offset.
std::string wcs_print(const GChatter &chatter=NORMAL) const
Print WCS information.
void free_members(void)
Delete class members.
std::vector< double > m_w
Intermediate values.
Abstract world coordinate system base class.
void copy_members(const GWcsTAN &wcs)
Copy class members.
double m_y0
Fiducial y offset.
Gnomonic (TAN) projection class definition.
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 gnomonic projection.
Gnomonic (TAN) projection class definition.
double sind(const double &angle)
Compute sine of angle in degrees.
double m_r0
Radius of the generating sphere.
Mathematical function definitions.
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.
bool m_bounds
Enable strict bounds checking.