|
GammaLib 2.2.0.dev
|
Global Sinusoidal (GLS) projection class definition. More...
#include <GWcsGLS.hpp>
Public Member Functions | |
| GWcsGLS (void) | |
| Void constructor. | |
| GWcsGLS (const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2) | |
| Projection constructor. | |
| GWcsGLS (const GWcsGLS &wcs) | |
| Copy constructor. | |
| virtual | ~GWcsGLS (void) |
| Destructor. | |
| GWcsGLS & | operator= (const GWcsGLS &wcs) |
| Assignment operator. | |
| virtual void | clear (void) |
| Clear Global Sinusoidal projection. | |
| virtual GWcsGLS * | clone (void) const |
| Clone Global Sinusoidal projection. | |
| virtual std::string | classname (void) const |
| Return class name. | |
| virtual std::string | code (void) const |
| Return projection code. | |
| virtual std::string | name (void) const |
| Return projection name. | |
| virtual std::string | print (const GChatter &chatter=NORMAL) const |
| Print Global Sinusoidal projection information. | |
Public Member Functions inherited from GWcsSFL | |
| GWcsSFL (void) | |
| Void constructor. | |
| GWcsSFL (const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2) | |
| Projection constructor. | |
| GWcsSFL (const GWcsSFL &wcs) | |
| Copy constructor. | |
| virtual | ~GWcsSFL (void) |
| Destructor. | |
| GWcsSFL & | operator= (const GWcsSFL &wcs) |
| Assignment operator. | |
Public Member Functions inherited from GWcs | |
| GWcs (void) | |
| Void constructor. | |
| GWcs (const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2) | |
| Standard WCS sky map constructor. | |
| GWcs (const GFitsHDU &hdu) | |
| Construct from FITS HDU table. | |
| GWcs (const GWcs &wcs) | |
| Copy constructor. | |
| virtual | ~GWcs (void) |
| Destructor. | |
| virtual GWcs & | operator= (const GWcs &wcs) |
| Assignment operator. | |
| virtual int | size (void) const |
| Return dimension of projection. | |
| virtual void | read (const GFitsHDU &hdu) |
| Read WCS definition from FITS header. | |
| virtual void | write (GFitsHDU &hdu) const |
| Write WCS definition into FITS HDU header. | |
| virtual double | solidangle (const GSkyPixel &pixel) const |
| Returns solid angle of pixel in units of steradians. | |
| virtual GSkyDir | pix2dir (const GSkyPixel &pixel) const |
| Returns sky direction of sky map pixel. | |
| virtual GSkyPixel | dir2pix (const GSkyDir &dir) const |
| Returns sky map pixel of sky direction. | |
| void | set (const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2) |
| Set World Coordinate System parameters. | |
| double | crval (const int &inx) const |
| Return value of reference pixel. | |
| double | crpix (const int &inx) const |
| Return reference pixel. | |
| double | cdelt (const int &inx) const |
| Return pixel size. | |
Public Member Functions inherited from GSkyProjection | |
| GSkyProjection (void) | |
| Void constructor. | |
| GSkyProjection (const GSkyProjection &proj) | |
| Copy constructor. | |
| virtual | ~GSkyProjection (void) |
| Destructor. | |
| virtual GSkyProjection & | operator= (const GSkyProjection &proj) |
| Assignment operator. | |
| virtual std::string | coordsys (void) const |
| Returns coordinate system. | |
| virtual void | coordsys (const std::string &coordsys) |
| Set coordinate system. | |
Public Member Functions inherited from GBase | |
| virtual | ~GBase (void) |
| Destructor. | |
Protected Member Functions | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GWcsGLS &wcs) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Member Functions inherited from GWcsSFL | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GWcsSFL &wcs) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
| void | prj_set (void) const |
| Setup of projection. | |
| 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. | |
Protected Member Functions inherited from GWcs | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GWcs &wcs) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
| void | set_members (const std::string &coords, const double &crval1, const double &crval2, const double &crpix1, const double &crpix2, const double &cdelt1, const double &cdelt2) |
| Set World Coordinate System parameters. | |
| virtual bool | compare (const GSkyProjection &proj) const |
| Compares sky projection. | |
| bool | undefined (const double &value) const |
| Check if value is undefined. | |
| void | wcs_ini (int naxis) |
| Initialise World Coordinate System. | |
| void | wcs_set (void) const |
| Setup of World Coordinate System. | |
| void | wcs_set_radesys (void) const |
| Set radesys and equinox members. | |
| void | wcs_set_ctype (void) const |
| Set CTYPEa keywords. | |
| void | wcs_p2s (int ncoord, int nelem, const double *pixcrd, double *imgcrd, double *phi, double *theta, double *world, int *stat) const |
| Pixel-to-world transformation. | |
| void | wcs_s2p (int ncoord, int nelem, const double *world, double *phi, double *theta, double *imgcrd, double *pixcrd, int *stat) const |
| World-to-pixel transformation. | |
| std::string | wcs_print (const GChatter &chatter=NORMAL) const |
| Print WCS information. | |
| std::string | wcs_print_value (const double &value) const |
| Helper function for value printing. | |
| void | cel_ini (void) const |
| Initialise celestial transformation parameters. | |
| void | cel_set (void) const |
| Setup of celestial transformation. | |
| void | cel_x2s (int nx, int ny, int sxy, int sll, const double *x, const double *y, double *phi, double *theta, double *lng, double *lat, int *stat) const |
| Pixel-to-world celestial transformation. | |
| void | cel_s2x (int nlng, int nlat, int sll, int sxy, const double *lng, const double *lat, double *phi, double *theta, double *x, double *y, int *stat) const |
| World-to-pixel celestial transformation. | |
| void | sph_x2s (int nphi, int ntheta, int spt, int sll, const double *phi, const double *theta, double *lng, double *lat) const |
| Rotation in the pixel-to-world direction. | |
| void | sph_s2x (int nlng, int nlat, int sll, int spt, const double *lng, const double *lat, double *phi, double *theta) const |
| Rotation in the pixel-to-world direction. | |
| void | spc_ini (void) |
| Initialise spectral transformation parameters. | |
| void | lin_ini (int naxis) |
| Initialise linear transformation parameters. | |
| void | lin_set (void) const |
| Initialise linear transformation parameters. | |
| void | lin_p2x (int ncoord, int nelem, const double *pixcrd, double *imgcrd) const |
| Pixel-to-world linear transformation. | |
| void | lin_x2p (int ncoord, int nelem, const double *imgcrd, double *pixcrd) const |
| World-to-pixel linear transformation. | |
| void | lin_matinv (const std::vector< double > &mat, std::vector< double > &inv) const |
| Invert linear transformation matrix. | |
| void | prj_ini (void) const |
| Initialise projection parameters. | |
| void | prj_off (const double &phi0, const double &theta0) const |
| Compute fiducial offset to force (x,y) = (0,0) at (phi0,theta0) | |
| int | prj_bchk (const double &tol, const int &nphi, const int &ntheta, const int &spt, double *phi, double *theta, int *stat) const |
| Performs bounds checking on native spherical coordinates. | |
| void | init_lock (const int &lock_id=0) const |
| Initializes an OpenMP lock with a specific name. | |
| void | set_lock (const int &lock_id=0) const |
| Sets an OpenMP lock with a specific name. | |
| void | unset_lock (const int &lock_id=0) const |
| Releases a previously set OpenMP lock. | |
Protected Member Functions inherited from GSkyProjection | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GSkyProjection &proj) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Additional Inherited Members | |
Protected Attributes inherited from GWcs | |
| bool | m_wcsset |
| WCS information is set. | |
| int | m_naxis |
| Number of axes. | |
| std::vector< double > | m_crval |
| CRVALia keyvalues for each coord axis. | |
| std::vector< std::string > | m_cunit |
| CUNITia keyvalues for each coord axis. | |
| std::vector< std::string > | m_ctype |
| CTYPEia keyvalues for each coord axis. | |
| std::vector< std::string > | m_ctype_c |
| CTYPEia comments for each coord axis. | |
| double | m_lonpole |
| LONPOLEa keyvalue. | |
| double | m_latpole |
| LATPOLEa keyvalue. | |
| double | m_restfrq |
| RESTFRQa keyvalue. | |
| double | m_restwav |
| RESTWAVa keyvalue. | |
| std::string | m_radesys |
| RADESYS keyvalue. | |
| double | m_equinox |
| EQUINOX keyvalue. | |
| std::vector< double > | m_cd |
| CDi_ja linear transformation matrix. | |
| std::vector< double > | m_crota |
| CROTAia keyvalues for each coord axis. | |
| int | m_lng |
| Longitude axis. | |
| int | m_lat |
| Latitude axis. | |
| int | m_spec |
| Spectral axis. | |
| bool | m_linset |
| Linear transformation is set. | |
| bool | m_unity |
| Signals unity PC matrix. | |
| std::vector< double > | m_crpix |
| CRPIXja keyvalues for each pixel axis. | |
| std::vector< double > | m_pc |
| PCi_ja linear transformation matrix. | |
| std::vector< double > | m_cdelt |
| CDELTia keyvalues for each coord axis. | |
| std::vector< double > | m_piximg |
| Pixel to image transformation matrix. | |
| std::vector< double > | m_imgpix |
| Image to pixel transformation matrix. | |
| bool | m_celset |
| Celestial transformation is set. | |
| bool | m_offset |
| Force (x,y) = (0,0) at (phi_0,theta_0) | |
| double | m_phi0 |
| Native azimuth angle of fiducial point. | |
| double | m_theta0 |
| Native zenith angle of fiducial point. | |
| double | m_ref [4] |
| Celestial coordinates of fiducial. | |
| double | m_euler [5] |
| Euler angles and functions thereof. | |
| int | m_latpreq |
| LATPOLEa requirement. | |
| bool | m_isolat |
| True if |latitude| is preserved. | |
| bool | m_prjset |
| Projection is set. | |
| double | m_r0 |
| Radius of the generating sphere. | |
| double | m_pv [PVN] |
| Projection parameters. | |
| bool | m_bounds |
| Enable strict bounds checking. | |
| double | m_x0 |
| Fiducial x offset. | |
| double | m_y0 |
| Fiducial y offset. | |
| std::vector< double > | m_w |
| Intermediate values. | |
| bool | m_has_pix2dir_cache |
| Has valid pix2dir cache value. | |
| bool | m_has_dir2pix_cache |
| Has valid dir2pix cache value. | |
| GSkyDir | m_last_pix2dir_dir |
| Last sky direction for pix2dir. | |
| GSkyDir | m_last_dir2pix_dir |
| Last sky direction for dir2pix. | |
| GSkyPixel | m_last_pix2dir_pix |
| Last pixel for pix2dir. | |
| GSkyPixel | m_last_dir2pix_pix |
| Last pixel for dir2pix. | |
Protected Attributes inherited from GSkyProjection | |
| int | m_coordsys |
| 0=CEL, 1=GAL | |
Global Sinusoidal (GLS) projection class definition.
This class implements the Global Sinusoidal projection for the World Coordinate System. The Global Sinusoidal projection is an alias of the Sanson-Flamsteed projection, and the GWcsGLS therefore derives from the GWcsSFL class.
Definition at line 45 of file GWcsGLS.hpp.
| GWcsGLS::GWcsGLS | ( | void | ) |
Void constructor.
Definition at line 62 of file GWcsGLS.cpp.
References init_members().
Referenced by clone().
| GWcsGLS::GWcsGLS | ( | const std::string & | coords, |
| const double & | crval1, | ||
| const double & | crval2, | ||
| const double & | crpix1, | ||
| const double & | crpix2, | ||
| const double & | cdelt1, | ||
| const double & | cdelt2 ) |
Projection constructor.
| [in] | coords | Coordinate system. |
| [in] | crval1 | X value of reference pixel. |
| [in] | crval2 | Y value of reference pixel. |
| [in] | crpix1 | X index of reference pixel (starting from 1). |
| [in] | crpix2 | Y index of reference pixel (starting from 1). |
| [in] | cdelt1 | Increment in x direction at reference pixel [deg]. |
| [in] | cdelt2 | Increment in y direction at reference pixel [deg]. |
Definition at line 83 of file GWcsGLS.cpp.
References init_members(), and GWcs::wcs_set().
| GWcsGLS::GWcsGLS | ( | const GWcsGLS & | wcs | ) |
Copy constructor.
| [in] | wcs | World Coordinate System. |
Definition at line 105 of file GWcsGLS.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Reimplemented from GWcsSFL.
Definition at line 82 of file GWcsGLS.hpp.
|
virtual |
Clear Global Sinusoidal projection.
Resets the Global Sinusoidal projection to an clean initial state.
Reimplemented from GWcsSFL.
Definition at line 178 of file GWcsGLS.cpp.
References GSkyProjection::free_members(), GWcs::free_members(), free_members(), GWcsSFL::free_members(), GSkyProjection::init_members(), GWcs::init_members(), init_members(), and GWcsSFL::init_members().
|
virtual |
Clone Global Sinusoidal projection.
Reimplemented from GWcsSFL.
Definition at line 202 of file GWcsGLS.cpp.
References GWcsGLS().
|
inlinevirtual |
Return projection code.
Returns the projection code "GLS".
Reimplemented from GWcsSFL.
Definition at line 96 of file GWcsGLS.hpp.
|
protected |
Copy class members.
| [in] | wcs | World Coordinate System. |
Definition at line 256 of file GWcsGLS.cpp.
Referenced by GWcsGLS(), and operator=().
|
protected |
Delete class members.
Definition at line 266 of file GWcsGLS.cpp.
Referenced by clear(), operator=(), and ~GWcsGLS().
|
protected |
Initialise class members.
Definition at line 244 of file GWcsGLS.cpp.
Referenced by clear(), GWcsGLS(), GWcsGLS(), GWcsGLS(), and operator=().
|
inlinevirtual |
Return projection name.
Returns the projection name.
Reimplemented from GWcsSFL.
Definition at line 110 of file GWcsGLS.hpp.
Assignment operator.
| [in] | wcs | World Coordinate System. |
Definition at line 143 of file GWcsGLS.cpp.
References copy_members(), free_members(), init_members(), and GWcsSFL::operator=().
Print Global Sinusoidal projection information.
| [in] | chatter | Chattiness. |
Reimplemented from GWcsSFL.
Definition at line 214 of file GWcsGLS.cpp.
References SILENT, and GWcs::wcs_print().