GammaLib
2.1.0.dev
|
Interface for the Fermi LAT livetime cube. More...
#include <GLATLtCube.hpp>
Public Member Functions | |
GLATLtCube (void) | |
Void constructor. More... | |
GLATLtCube (const GFilename &filename) | |
File constructor. More... | |
GLATLtCube (const GLATLtCube &cube) | |
Copy constructor. More... | |
virtual | ~GLATLtCube (void) |
Destructor. More... | |
GLATLtCube & | operator= (const GLATLtCube &cube) |
Assignment operator. More... | |
double | operator() (const GSkyDir &dir, const GEnergy &energy, _ltcube_ctheta fct) const |
Sum function multiplied by efficiency corrected livetime over zenith angle. More... | |
double | operator() (const GSkyDir &dir, const GEnergy &energy, _ltcube_ctheta_phi fct) const |
Sum function multiplied by efficiency corrected livetime over zenith and azimuth angles. More... | |
double | operator() (const GSkyDir &dir, const GEnergy &energy, const GLATAeff &aeff) const |
Sum effective area multiplied by efficiency corrected livetime over zenith and (optionally) azimuth angles. More... | |
double | operator() (const GSkyDir &dir, const GEnergy &energy, const double &offset, const GLATPsf &psf, const GLATAeff &aeff) const |
Sum point spread function multiplied by efficiency corrected livetime over zenith angles. More... | |
void | clear (void) |
Clear livetime cube. More... | |
GLATLtCube * | clone (void) const |
Clone livetime cube. More... | |
std::string | classname (void) const |
Return class name. More... | |
void | load (const GFilename &filename) |
Load livetime cube from FITS file. More... | |
void | save (const GFilename &filename, const bool &clobber=false) const |
Save livetime cube into FITS file. More... | |
void | read (const GFits &file) |
Read livetime cube from FITS file. More... | |
void | write (GFits &file) const |
Write livetime cube into FITS file. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print livetime cube information. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Private Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GLATLtCube &cube) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Private Attributes | |
GLATLtCubeMap | m_exposure |
GLATLtCubeMap | m_weighted_exposure |
GGti | m_gti |
Interface for the Fermi LAT livetime cube.
The livetime cube holds the livetime as function and zenith and azimuth angles for a given observation. The azimuth dependence is optional.
Definition at line 59 of file GLATLtCube.hpp.
GLATLtCube::GLATLtCube | ( | void | ) |
Void constructor.
Definition at line 59 of file GLATLtCube.cpp.
References init_members().
Referenced by clone().
|
explicit |
File constructor.
[in] | filename | Livetime cube filename. |
Definition at line 74 of file GLATLtCube.cpp.
References init_members(), and load().
GLATLtCube::GLATLtCube | ( | const GLATLtCube & | cube | ) |
Copy constructor.
[in] | cube | Livetime cube. |
Definition at line 92 of file GLATLtCube.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 110 of file GLATLtCube.hpp.
|
virtual |
Clear livetime cube.
Implements GBase.
Definition at line 360 of file GLATLtCube.cpp.
References free_members(), and init_members().
|
virtual |
Clone livetime cube.
Implements GBase.
Definition at line 378 of file GLATLtCube.cpp.
References GLATLtCube().
Referenced by GLATObservation::copy_members().
|
private |
Copy class members.
[in] | cube | Livetime cube. |
Definition at line 553 of file GLATLtCube.cpp.
References m_exposure, m_gti, and m_weighted_exposure.
Referenced by GLATLtCube(), and operator=().
|
private |
Delete class members.
Definition at line 568 of file GLATLtCube.cpp.
Referenced by clear(), operator=(), and ~GLATLtCube().
|
private |
Initialise class members.
Definition at line 536 of file GLATLtCube.cpp.
References GGti::clear(), GLATLtCubeMap::clear(), m_exposure, m_gti, and m_weighted_exposure.
Referenced by clear(), GLATLtCube(), and operator=().
void GLATLtCube::load | ( | const GFilename & | filename | ) |
Load livetime cube from FITS file.
[in] | filename | FITS file name. |
Definition at line 389 of file GLATLtCube.cpp.
References clear(), GFits::close(), and read().
Referenced by GLATLtCube(), GLATObservation::load_binned(), and GLATObservation::load_unbinned().
double GLATLtCube::operator() | ( | const GSkyDir & | dir, |
const GEnergy & | energy, | ||
_ltcube_ctheta | fct | ||
) | const |
Sum function multiplied by efficiency corrected livetime over zenith angle.
[in] | dir | Sky direction. |
[in] | energy | Energy. |
[in] | fct | Function to evaluate. |
Computes
\[\sum_{\cos \theta} T_{\rm corr.~live}(\cos \theta) f(\cos \theta)\]
where \(T_{\rm corr.~live}(\cos \theta)\) is the efficiency corrected livetime as a function of the cosine of the zenith angle, and \(f(\cos \theta)\) is a function that depends on the cosine of the zenith angle.
Note that no efficieny correction is implemented for this method as the efficiency factors are stored together with the effective area. If we want efficiency correction here, we should think about passing this information to the method.
Definition at line 172 of file GLATLtCube.cpp.
References m_exposure.
double GLATLtCube::operator() | ( | const GSkyDir & | dir, |
const GEnergy & | energy, | ||
_ltcube_ctheta_phi | fct | ||
) | const |
Sum function multiplied by efficiency corrected livetime over zenith and azimuth angles.
[in] | dir | Sky direction. |
[in] | energy | Energy. |
[in] | fct | Function to evaluate. |
Computes
\[\sum_{\cos \theta, \phi} T_{\rm corr.~live}(\cos \theta, \phi) f(\cos \theta, \phi)\]
where \(T_{\rm corr.~live}(\cos \theta, \phi)\) is the efficiency corrected livetime as a function of the cosine of the zenith and of the azimuth angle, and \(f(\cos \theta, \phi)\) is a function that depends on the cosine of the zenith angle and of the azimuth angle.
Note that no efficieny correction is implemented for this method as the efficiency factors are stored together with the effective area. If we want efficiency correction here, we should think about passing this information to the method.
Definition at line 224 of file GLATLtCube.cpp.
References m_exposure.
double GLATLtCube::operator() | ( | const GSkyDir & | dir, |
const GEnergy & | energy, | ||
const GLATAeff & | aeff | ||
) | const |
Sum effective area multiplied by efficiency corrected livetime over zenith and (optionally) azimuth angles.
[in] | dir | Sky direction. |
[in] | energy | Energy. |
[in] | aeff | Effective area. |
Computes
\[\sum_{\cos \theta, \phi} T_{\rm corr.~live}(\cos \theta, \phi) A_{\rm eff}(\cos \theta, \phi)\]
where \(T_{\rm corr.~live}(\cos \theta, \phi)\) is the efficiency corrected livetime as a function of the cosine of the zenith and of the azimuth angle, and \(A_{\rm eff}(\cos \theta, \phi)\) is the effective area that depends on the cosine of the zenith angle and (optionally) of the azimuth angle.
Definition at line 271 of file GLATLtCube.cpp.
References GLATAeff::efficiency_factor1(), GLATAeff::efficiency_factor2(), GLATAeff::has_efficiency(), m_exposure, and m_weighted_exposure.
double GLATLtCube::operator() | ( | const GSkyDir & | dir, |
const GEnergy & | energy, | ||
const double & | offset, | ||
const GLATPsf & | psf, | ||
const GLATAeff & | aeff | ||
) | const |
Sum point spread function multiplied by efficiency corrected livetime over zenith angles.
[in] | dir | Sky direction. |
[in] | energy | Energy. |
[in] | offset | Offset from true direction (deg). |
[in] | psf | Point spread function. |
[in] | aeff | Effective area. |
Computes
\[\sum_{\cos \theta, \phi} T_{\rm corr.~live}(\cos \theta, \phi) PSF(\log E, \delta, \cos \theta) A_{\rm eff}(\cos \theta, \phi)\]
where \(T_{\rm corr.~live}(\cos \theta, \phi)\) is the efficiency corrected livetime as a function of the cosine of the zenith and of the azimuth angle, \(PSF(\log E, \delta, \cos \theta)\) is the point spread function that depends on the log10 of the energy (in MeV), the offset angle from the true direction (in degrees), and the cosine of the zenith angle, and \(A_{\rm eff}(\cos \theta, \phi)\) is the effective area that depends on the cosine of the zenith angle and (optionally) of the azimuth angle.
Definition at line 323 of file GLATLtCube.cpp.
References GLATAeff::efficiency_factor1(), GLATAeff::efficiency_factor2(), GLATAeff::has_efficiency(), m_exposure, and m_weighted_exposure.
GLATLtCube & GLATLtCube::operator= | ( | const GLATLtCube & | cube | ) |
Assignment operator.
[in] | cube | Livetime cube. |
Definition at line 130 of file GLATLtCube.cpp.
References copy_members(), free_members(), and init_members().
Print livetime cube information.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 501 of file GLATLtCube.cpp.
References m_exposure, m_gti, m_weighted_exposure, GLATLtCubeMap::print(), GGti::print(), gammalib::reduce(), and SILENT.
Referenced by GLATObservation::print().
void GLATLtCube::read | ( | const GFits & | fits | ) |
Read livetime cube from FITS file.
[in] | fits | FITS. |
Reads a livetime cube from a FITS file.
Definition at line 443 of file GLATLtCube.cpp.
References clear(), gammalib::extname_gti, gammalib::extname_lat_exposure, gammalib::extname_lat_wgtexposure, m_exposure, m_gti, m_weighted_exposure, GLATLtCubeMap::read(), GGti::read(), and GFits::table().
Referenced by load().
void GLATLtCube::save | ( | const GFilename & | filename, |
const bool & | clobber = false |
||
) | const |
Save livetime cube into FITS file.
[in] | filename | FITS file name. |
[in] | clobber | Overwrite existing file? (default: false) |
Definition at line 416 of file GLATLtCube.cpp.
References GFits::saveto(), and write().
void GLATLtCube::write | ( | GFits & | fits | ) | const |
Write livetime cube into FITS file.
[in] | fits | FITS file. |
Writes the livetime cube into a FITS file.
Definition at line 477 of file GLATLtCube.cpp.
References gammalib::extname_gti, gammalib::extname_lat_exposure, gammalib::extname_lat_wgtexposure, m_exposure, m_gti, m_weighted_exposure, GLATLtCubeMap::write(), and GGti::write().
Referenced by save().
|
private |
Definition at line 98 of file GLATLtCube.hpp.
Referenced by copy_members(), init_members(), operator()(), print(), read(), and write().
|
private |
Definition at line 100 of file GLATLtCube.hpp.
Referenced by copy_members(), init_members(), print(), read(), and write().
|
private |
Definition at line 99 of file GLATLtCube.hpp.
Referenced by copy_members(), init_members(), operator()(), print(), read(), and write().