GammaLib
2.0.0
|
Abstract sky projection base class. More...
#include <GSkyProjection.hpp>
Public Member Functions | |
GSkyProjection (void) | |
Void constructor. More... | |
GSkyProjection (const GSkyProjection &proj) | |
Copy constructor. More... | |
virtual | ~GSkyProjection (void) |
Destructor. More... | |
virtual GSkyProjection & | operator= (const GSkyProjection &proj) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GSkyProjection * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual int | size (void) const =0 |
virtual std::string | code (void) const =0 |
virtual std::string | name (void) const =0 |
virtual void | read (const GFitsHDU &hdu)=0 |
virtual void | write (GFitsHDU &hdu) const =0 |
virtual double | solidangle (const GSkyPixel &pixel) const =0 |
virtual GSkyDir | pix2dir (const GSkyPixel &pixel) const =0 |
virtual GSkyPixel | dir2pix (const GSkyDir &dir) const =0 |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
virtual std::string | coordsys (void) const |
Returns coordinate system. More... | |
virtual void | coordsys (const std::string &coordsys) |
Set coordinate system. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GSkyProjection &proj) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
virtual bool | compare (const GSkyProjection &proj) const =0 |
Protected Attributes | |
int | m_coordsys |
0=CEL, 1=GAL More... | |
Friends | |
bool | operator== (const GSkyProjection &a, const GSkyProjection &b) |
Equality operator. More... | |
bool | operator!= (const GSkyProjection &a, const GSkyProjection &b) |
Non-equality operator. More... | |
Abstract sky projection base class.
This class defines an abstract projection from sky coordinates into pixel coordinates. Sky coordinates are implemented using the GSkyDir class, pixel coordinates are implemented using the GSkyPixel class.
Definition at line 47 of file GSkyProjection.hpp.
GSkyProjection::GSkyProjection | ( | void | ) |
GSkyProjection::GSkyProjection | ( | const GSkyProjection & | proj | ) |
Copy constructor.
[in] | proj | Sky projection. |
Definition at line 73 of file GSkyProjection.cpp.
References copy_members(), and init_members().
|
virtual |
|
pure virtual |
|
pure virtual |
Clear object.
Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.
Implements GBase.
Implemented in GWcs, GHealpix, GWcsGLS, GWcsAIT, GWcsARC, GWcsAZP, GWcsCAR, GWcsMER, GWcsMOL, GWcsSFL, GWcsSIN, GWcsSTG, and GWcsTAN.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GBase.
Implemented in GWcs, GHealpix, GWcsGLS, GWcsAIT, GWcsARC, GWcsAZP, GWcsCAR, GWcsMER, GWcsMOL, GWcsSFL, GWcsSIN, GWcsSTG, and GWcsTAN.
Referenced by GSkyMap::copy_members(), and GSkyMap::projection().
|
pure virtual |
Implemented in GWcs, GHealpix, GWcsGLS, GWcsAIT, GWcsARC, GWcsAZP, GWcsCAR, GWcsMER, GWcsMOL, GWcsSFL, GWcsSIN, GWcsSTG, and GWcsTAN.
Referenced by GSkyMap::extract(), GSkyMap::is_same(), GSkyMap::save(), GSkyMap::stack_maps(), and GSkyMap::write().
|
protectedpure virtual |
Implemented in GWcs, and GHealpix.
Referenced by operator==().
|
virtual |
Returns coordinate system.
Returns one of 'CEL' (celestial), 'GAL' (galactic),
Definition at line 147 of file GSkyProjection.cpp.
References m_coordsys.
Referenced by gammalib::com_wcs_mer2car(), GSkyMap::extract(), GHealpix::GHealpix(), GSkyMap::is_same(), GHealpix::print(), GHealpix::read(), GWcs::set_members(), GWcs::wcs_print(), and GHealpix::write().
|
virtual |
Set coordinate system.
[in] | coordsys | Coordinate system |
GException::invalid_argument | Invalid coordsys parameter. |
Set coordinate system from std::string. The method recognizes the following codes: 'EQU', 'CEL', 'C': celestial, 'GAL', 'G': galactic,
Definition at line 181 of file GSkyProjection.cpp.
References G_COORDSYS_SET, m_coordsys, and gammalib::toupper().
|
protected |
Copy class members.
[in] | proj | Sky projection. |
Definition at line 229 of file GSkyProjection.cpp.
References m_coordsys.
Referenced by GSkyProjection(), and operator=().
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::dir2inx(), and GSkyMap::dir2pix().
|
protected |
Delete class members.
Definition at line 242 of file GSkyProjection.cpp.
Referenced by GWcsAIT::clear(), GWcsTAN::clear(), GWcsSTG::clear(), GWcsSIN::clear(), GWcsCAR::clear(), GWcsMER::clear(), GWcsMOL::clear(), GWcsARC::clear(), GWcsSFL::clear(), GWcsAZP::clear(), GWcsGLS::clear(), GHealpix::clear(), operator=(), GWcs::read(), and ~GSkyProjection().
|
protected |
Initialise class members.
Definition at line 214 of file GSkyProjection.cpp.
References m_coordsys.
Referenced by GWcsAIT::clear(), GWcsTAN::clear(), GWcsSTG::clear(), GWcsSIN::clear(), GWcsCAR::clear(), GWcsMER::clear(), GWcsMOL::clear(), GWcsARC::clear(), GWcsSFL::clear(), GWcsAZP::clear(), GWcsGLS::clear(), GHealpix::clear(), GSkyProjection(), operator=(), and GWcs::read().
|
pure virtual |
|
virtual |
Assignment operator.
[in] | proj | Sky projection. |
Definition at line 111 of file GSkyProjection.cpp.
References copy_members(), free_members(), and init_members().
Referenced by GHealpix::operator=(), and GWcs::operator=().
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::inx2dir(), and GSkyMap::pix2dir().
Print content of object.
[in] | chatter | Chattiness (defaults to NORMAL). |
Formats the content in a standard way and puts this content in a C++ string that is returned.
Implements GBase.
Implemented in GHealpix, GWcs, GWcsGLS, GWcsAIT, GWcsARC, GWcsAZP, GWcsCAR, GWcsMER, GWcsMOL, GWcsSFL, GWcsSIN, GWcsSTG, and GWcsTAN.
Referenced by GLATEventCube::print(), and GSkyMap::print().
|
pure virtual |
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::read_healpix(), and GSkyMap::read_wcs().
|
pure virtual |
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::flux(), GSkyMap::operator()(), GSkyMap::pix2dir(), GSkyMap::print(), and GSkyMap::solidangle().
|
pure virtual |
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::solidangle().
|
pure virtual |
Implemented in GWcs, and GHealpix.
Referenced by GSkyMap::create_healpix_hdu(), and GSkyMap::create_wcs_hdu().
|
friend |
Non-equality operator.
[in] | a | First sky projection. |
[in] | b | Second sky projection. |
a
and b
are not identical. Definition at line 276 of file GSkyProjection.cpp.
|
friend |
Equality operator.
[in] | a | First sky projection. |
[in] | b | Second sky projection. |
a
and b
are identical. Definition at line 262 of file GSkyProjection.cpp.
|
protected |
0=CEL, 1=GAL
Definition at line 88 of file GSkyProjection.hpp.
Referenced by GHealpix::compare(), GWcs::compare(), coordsys(), copy_members(), GHealpix::dir2pix(), GWcs::dir2pix(), init_members(), GHealpix::interpolator(), GHealpix::loc2dir(), GHealpix::pix2dir(), GWcs::pix2dir(), GWcs::wcs_set_ctype(), and GWcs::wcs_set_radesys().