GammaLib
2.0.0
|
COMPTEL Data Space class. More...
#include <GCOMDri.hpp>
Public Member Functions | |
GCOMDri (void) | |
Void constructor. More... | |
GCOMDri (const GFilename &filename) | |
File name constructor. More... | |
GCOMDri (const GSkyMap &map, const double &phimin=0.0, const double &phibin=0.0, const int &nphibin=0) | |
Sky map constructor. More... | |
GCOMDri (const GCOMDri &dri) | |
Copy constructor. More... | |
virtual | ~GCOMDri (void) |
Destructor. More... | |
GCOMDri & | operator= (const GCOMDri &dri) |
Assignment operator. More... | |
double & | operator[] (const int &index) |
DRI bin access operators. More... | |
const double & | operator[] (const int &index) const |
DRI bin access operators (const version) More... | |
virtual void | clear (void) |
Clear COMPTEL Data Space. More... | |
virtual GCOMDri * | clone (void) const |
Clone COMPTEL Data Space. More... | |
virtual std::string | classname (void) const |
Return class name. More... | |
virtual std::string | print (const GChatter &chatter=NORMAL) const |
Print COMPTEL Data Space. More... | |
int | size (void) const |
Return number of bins. More... | |
int | nchi (void) const |
Return number of Chi bins. More... | |
int | npsi (void) const |
Return number of Psi bins. More... | |
int | nphibar (void) const |
Return number of Phibar bins. More... | |
const GSkyMap & | map (void) const |
Return DRI sky map. More... | |
const std::string & | name (void) const |
Return DRI cube name. More... | |
void | name (const std::string &name) |
Set DRI cube name. More... | |
const GEbounds & | ebounds (void) const |
Return energy boundaries of DRI cube. More... | |
void | ebounds (const GEbounds &ebounds) |
Set energy boundaries of DRI cube. More... | |
const GGti & | gti (void) const |
Return Good Time Intervals of DRI cube. More... | |
void | gti (const GGti >i) |
Set Good Time Intervals of DRI cube. More... | |
const double & | phimin (void) const |
Return minimum Compton scatter angle of DRI cube. More... | |
const double & | phibin (void) const |
Return Compton scatter angle bin of DRI cube. More... | |
const double & | tof_correction (void) const |
Return ToF correction factor. More... | |
void | tof_correction (const double &tofcor) |
Set ToF correction factor. More... | |
const double & | phase_correction (void) const |
Return pulsar phase correction factor. More... | |
void | phase_correction (const double &phasecor) |
Set pulsar phase correction factor. More... | |
const int & | num_superpackets (void) const |
Return number of superpackets read for DRI. More... | |
void | num_superpackets (const int &number) |
Set number of superpackets read for DRI. More... | |
const int & | num_used_superpackets (void) const |
Return number of superpackets used for DRI. More... | |
void | num_used_superpackets (const int &number) |
Set number of superpackets used for DRI. More... | |
const int & | num_skipped_superpackets (void) const |
Return number of superpackets skipped for DRI. More... | |
void | num_skipped_superpackets (const int &number) |
Set number of superpackets skipped for DRI. More... | |
void | compute_dre (const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection(), const double &zetamin=5.0) |
Compute event cube. More... | |
void | compute_drg (const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection(), const double &zetamin=5.0) |
Compute geometry cube. More... | |
void | compute_drx (const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection()) |
Compute DRX exposure map. More... | |
void | compute_drm (const GCOMObservation &obs, const GModel &model) |
Compute DRM model. More... | |
double | cone_content (const GSkyDir &dir, const double &armmin, const double &armmax) const |
Compute content in cone. More... | |
void | load (const GFilename &filename) |
Load COMPTEL Data Space from DRI FITS file. More... | |
void | save (const GFilename &filename, const bool &clobber=false) const |
Save COMPTEL Data Space into DRI FITS file. More... | |
void | read (const GFitsImage &image) |
Read COMPTEL Data Space from DRI FITS image. More... | |
void | write (GFits &fits, const std::string &extname="") const |
Write COMPTEL Data Space into FITS image. 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 GCOMDri &dri) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | init_cube (void) |
Initialise DRI cube. More... | |
void | init_statistics (void) |
Initialise computation statistics. More... | |
bool | use_superpacket (const GCOMOad &oad, const GCOMTim &tim, const GCOMSelection &select) |
Check if superpacket should be used. More... | |
void | read_attributes (const GFitsHDU *hdu) |
Read DRI attributes from FITS HDU. More... | |
void | write_attributes (GFitsHDU *hdu) const |
Write DRI attributes into FITS HDU. More... | |
double | compute_geometry (const int &tjd, const double &theta, const double &phi, const GCOMSelection &select, const GCOMStatus &status) const |
Compute DRG geometry factor. More... | |
double | compute_surface (const double &x1, const double &y1, const double &r1, const double &x2, const double &y2, const double &r2) const |
Compute surface of overlap between two circles. More... | |
double | compute_overlap (const double &x1, const double &y1, const double &r1, const double &x2, const double &y2, const double &r2, const double &x3, const double &y3, const double &r3) const |
Compute overlap between three circles. More... | |
void | compute_tof_correction (void) |
Compute ToF correction. More... | |
Protected Attributes | |
std::string | m_name |
Data cube name. More... | |
GSkyMap | m_dri |
Data cube. More... | |
GEbounds | m_ebounds |
Energy boundaries of data cube. More... | |
GGti | m_gti |
Good Time Intervals of data cube. More... | |
double | m_phimin |
Phibar minimum (deg) More... | |
double | m_phibin |
Phibar binsize (deg) More... | |
double | m_tofcor |
ToF correction. More... | |
double | m_phasecor |
Pulsar phase correction. More... | |
GTime | m_tstart |
Selection start time. More... | |
GTime | m_tstop |
Selection stop time. More... | |
int | m_num_superpackets |
Number of superpackets. More... | |
int | m_num_used_superpackets |
Number of used superpackets. More... | |
int | m_num_skipped_superpackets |
Number of skipped superpackets. More... | |
bool | m_has_selection |
Signal that selection was applied. More... | |
GCOMSelection | m_selection |
Selection parameters. More... | |
double | m_zetamin |
Minimum zeta angle. More... | |
COMPTEL Data Space class.
Definition at line 61 of file GCOMDri.hpp.
GCOMDri::GCOMDri | ( | void | ) |
Void constructor.
Definition at line 89 of file GCOMDri.cpp.
References init_members().
Referenced by clone().
|
explicit |
File name constructor.
[in] | filename | COMPTEL Data Space FITS file name. |
Definition at line 104 of file GCOMDri.cpp.
References init_members(), and load().
GCOMDri::GCOMDri | ( | const GSkyMap & | map, |
const double & | phimin = 0.0 , |
||
const double & | phibin = 0.0 , |
||
const int & | nphibin = 0 |
||
) |
Sky map constructor.
[in] | map | Sky map defining the DRI cube. |
[in] | phimin | Minimum Phibar angle (deg). |
[in] | phibin | Bin size of Phibar angle (deg). |
[in] | nphibin | Number of Phibar bins. |
Constructs a DRI cube from a sky map and a Phibar binning definition.
Definition at line 127 of file GCOMDri.cpp.
References init_members(), m_dri, m_phibin, m_phimin, map(), GSkyMap::nmaps(), phibin(), and phimin().
GCOMDri::GCOMDri | ( | const GCOMDri & | dri | ) |
Copy constructor.
[in] | dri | COMPTEL Data Space. |
Definition at line 160 of file GCOMDri.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GBase.
Definition at line 181 of file GCOMDri.hpp.
|
virtual |
Clear COMPTEL Data Space.
Implements GBase.
Definition at line 228 of file GCOMDri.cpp.
References free_members(), and init_members().
Referenced by GCOMModelDRM::init_members(), GCOMEventCube::init_members(), GCOMObservation::init_members(), and read().
|
virtual |
Clone COMPTEL Data Space.
Implements GBase.
Definition at line 246 of file GCOMDri.cpp.
References GCOMDri().
void GCOMDri::compute_dre | ( | const GCOMObservation & | obs, |
const GCOMSelection & | select = GCOMSelection() , |
||
const double & | zetamin = 5.0 |
||
) |
Compute event cube.
[in] | obs | COMPTEL observation. |
[in] | select | Selection set. |
[in] | zetamin | Minimum Earth horizon - Phibar cut (deg). |
GException::invalid_argument | DRE cube has a non-positive Phibar bin size. |
GException::invalid_value | No BVC data available for pulsar selection |
Compute DRE event cube for a COMPTEL observation.
Definition at line 266 of file GCOMDri.cpp.
References abs(), GCOMObservation::bvcs(), compute_tof_correction(), GPhases::contains(), GSkyMap::contains(), GPulsarEphemeris::dir(), GSkyMap::dir2pix(), GSkyDir::dist_deg(), GEbounds::emax(), GEbounds::emin(), GPulsar::ephemeris(), GObservation::events(), G_COMPUTE_DRE, GCOMOad::gcaz(), GCOMOad::gcel(), GEphemerides::geo2ssb(), GCOMOad::georad(), GCOMSelection::has_pulsar(), init_cube(), GCOMSelection::init_statistics(), init_statistics(), GCOMBvcs::is_empty(), GPhases::length(), m_dri, m_ebounds, m_gti, m_has_selection, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phasecor, m_phibin, m_phimin, m_selection, m_tstart, m_tstop, m_zetamin, nphibar(), GSkyMap::npix(), GCOMObservation::oads(), GPulsarEphemeris::phase(), GSkyMap::pix2inx(), GCOMOad::pos(), GCOMSelection::pulsar(), GCOMSelection::pulsar_phases(), GSkyDir::radec_deg(), GCOMTim::reduce(), GGti::reduce(), GCOMEventList::size(), GCOMOads::size(), GGti::size(), gammalib::str(), GCOMBvcs::tdelta(), GCOMObservation::tim(), GCOMOad::tstart(), GGti::tstart(), GCOMOad::tstop(), GGti::tstop(), GCOMSelection::use_event(), use_superpacket(), GPulsar::validity(), and gammalib::warning().
void GCOMDri::compute_drg | ( | const GCOMObservation & | obs, |
const GCOMSelection & | select = GCOMSelection() , |
||
const double & | zetamin = 5.0 |
||
) |
Compute geometry cube.
[in] | obs | COMPTEL observation. |
[in] | select | Selection set. |
[in] | zetamin | Minimum Earth horizon - Phibar cut (deg). |
GException::invalid_value | No BVC data available for pulsar selection |
Compute DRG cube for a COMPTEL observation.
Definition at line 558 of file GCOMDri.cpp.
References GEbounds::clear(), compute_geometry(), GCOMOad::gcaz(), GCOMOad::gcel(), GCOMOad::georad(), GCOMSelection::has_pulsar(), init_cube(), init_statistics(), GSkyMap::inx2dir(), m_dri, m_ebounds, m_gti, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phibin, m_selection, m_tstart, m_tstop, norm(), nphibar(), GSkyMap::npix(), GCOMObservation::oads(), GCOMOad::phi(), GCOMSelection::pulsar(), GSkyDir::radec_deg(), GCOMTim::reduce(), GCOMOads::size(), size(), GCOMOad::theta(), GCOMObservation::tim(), GCOMOad::tjd(), use_superpacket(), and GPulsar::validity().
void GCOMDri::compute_drm | ( | const GCOMObservation & | obs, |
const GModel & | model | ||
) |
Compute DRM model.
[in] | obs | COMPTEL observation. |
[in] | model | Model. |
Compute DRM model cube for a COMPTEL observation.
Definition at line 810 of file GCOMDri.cpp.
References GModel::eval(), m_dri, nchi(), nphibar(), and npsi().
void GCOMDri::compute_drx | ( | const GCOMObservation & | obs, |
const GCOMSelection & | select = GCOMSelection() |
||
) |
Compute DRX exposure map.
[in] | obs | COMPTEL observation. |
[in] | select | Selection set. |
GException::invalid_value | No BVC data available for pulsar selection |
Compute DRX exposure map for a COMPTEL observation.
For a given superpacket, the exposure is computed using
\[ X_i(\theta_c) = 7 \pi r_1^2 \cos \theta_c \frac{1 - \exp \left( -\tau \ \cos \theta_c \right)} {1 - \exp \left( -\tau \right)} \]
where \(\tau=0.2\) is the typical thickness of a D1 module in radiation lengths, \(r_1=13.8\) cm is the radius of a D1 module, and \(\theta_c\) is the zenith angle in COMPTEL coordinates.
Definition at line 703 of file GCOMDri.cpp.
References GEbounds::clear(), cos(), d1_area, gammalib::deg2rad, exp(), GCOMSelection::has_pulsar(), init_cube(), init_statistics(), GSkyMap::inx2dir(), m_dri, m_ebounds, m_gti, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_tstart, m_tstop, GSkyMap::npix(), GCOMObservation::oads(), GCOMSelection::pulsar(), GCOMTim::reduce(), GCOMOads::size(), size(), superpacket_duration, GCOMOad::theta(), GCOMObservation::tim(), use_superpacket(), and GPulsar::validity().
|
protected |
Compute DRG geometry factor.
[in] | tjd | TJD for module status |
[in] | theta | Zenith angle in COMPTEL coordinates (deg). |
[in] | phi | Azimuth angle in COMPTEL coordinates (deg). |
[in] | select | Selection set. |
[in] | status | D1 and D2 module status |
Computes the DRG geometry factor as function of zenith and azimuth angles given in the COMPTEL coordinate system.
Definition at line 1466 of file GCOMDri.cpp.
References gammalib::acos(), gammalib::com_exd2r(), gammalib::com_exd2x(), gammalib::com_exd2y(), compute_overlap(), cos(), GCOMStatus::d1status(), GCOMStatus::d2status(), gammalib::deg2rad, GCOMSelection::fpmtflag(), gammalib::pi, r1, r1sq, sin(), sqrt(), tan(), GCOMSelection::use_d1(), and GCOMSelection::use_d2().
Referenced by compute_drg().
|
protected |
Compute overlap between three circles.
[in] | x1 | X position of D1 projection (cm). |
[in] | y1 | Y position of D1 projection (cm). |
[in] | r1 | Radius D1 module (cm). |
[in] | x2 | X position of D2 module (cm). |
[in] | y2 | Y position of D2 module (cm). |
[in] | r2 | Radius D2 module (cm). |
[in] | x3 | X position of dead PMT (cm). |
[in] | y3 | Y position of dead PMT (cm). |
[in] | r3 | Radius of dead PMT (cm). |
Compute fractional overlap between three circles, composed of projected D1 module, D2 module and failed PMT exclusion circle.
The method is a reimplementation of the COMPASS SKYDRS17.OVERLP function.
Definition at line 1707 of file GCOMDri.cpp.
References compute_surface(), gammalib::pi, r1, r1sq, size(), and sqrt().
Referenced by compute_geometry().
|
protected |
Compute surface of overlap between two circles.
[in] | x1 | X position of D2 module (cm). |
[in] | y1 | Y position of D2 module (cm). |
[in] | r1 | Radius D2 module (cm). |
[in] | x2 | X position of dead PMT (cm). |
[in] | y2 | Y position of dead PMT (cm). |
[in] | r2 | Radius of dead PMT (cm). |
Computes the surface of overlap in cm^2 between two circles, composed of D2 module and failed PMT exclusion circle.
The method is a reimplementation of the COMPASS SKYDRS17.COM2 function.
Definition at line 1633 of file GCOMDri.cpp.
References gammalib::acos(), gammalib::pi, r1, r1sq, and sqrt().
Referenced by compute_overlap().
|
protected |
Compute ToF correction.
Compute the ToF correction according to COM-RP-ROL-DRG-057.
Definition at line 1823 of file GCOMDri.cpp.
References GEbounds::emax(), GEbounds::emin(), G_COMPUTE_TOF_CORRECTION, m_ebounds, m_selection, m_tofcor, GEnergy::MeV(), sqrt(), gammalib::str(), GCOMSelection::tof_max(), GCOMSelection::tof_min(), and gammalib::warning().
Referenced by compute_dre().
double GCOMDri::cone_content | ( | const GSkyDir & | dir, |
const double & | armmin, | ||
const double & | armmax | ||
) | const |
Compute content in cone.
[in] | dir | Sky direction of cone apex. |
[in] | armmin | Minimum Angular Resolution Measure (deg). |
[in] | armmax | Maximum Angular Resolution Measure (deg). |
Compute the sum of the DRI bins within an event cone with apex at a given sky direction. All bins with an Angular Resolution Measure comprised between armmin
(inclusive) and armmax
(exclusive) will be considered. The bin centres will be used for the computation of the Angular Resolution Measure. The Angular Resolution Measure is defined as phibar - phigeo.
Definition at line 846 of file GCOMDri.cpp.
References GSkyDir::dist_deg(), GSkyMap::extract(), GSkyMap::inx2dir(), m_dri, nphibar(), GSkyMap::npix(), phibin(), and phimin().
|
protected |
Copy class members.
[in] | dri | COMPTEL Data Space. |
Definition at line 1110 of file GCOMDri.cpp.
References m_dri, m_ebounds, m_gti, m_has_selection, m_name, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phasecor, m_phibin, m_phimin, m_selection, m_tofcor, m_tstart, m_tstop, and m_zetamin.
Referenced by GCOMDri(), and operator=().
|
inline |
Return energy boundaries of DRI cube.
Definition at line 306 of file GCOMDri.hpp.
References m_ebounds.
Referenced by ebounds(), and GCOMEventCube::init_cube().
|
inline |
Set energy boundaries of DRI cube.
[in] | ebounds | Energy boundaries of DRI cube. |
Sets energy boundaries of DRI cube
Definition at line 320 of file GCOMDri.hpp.
|
protected |
Delete class members.
Definition at line 1142 of file GCOMDri.cpp.
Referenced by clear(), operator=(), and ~GCOMDri().
|
inline |
Return Good Time Intervals of DRI cube.
Definition at line 333 of file GCOMDri.hpp.
References m_gti.
Referenced by gti(), and GCOMEventCube::init_cube().
|
inline |
Set Good Time Intervals of DRI cube.
[in] | gti | Good Time Intervals of DRI data. |
Sets the Good Time Intervals of DRI cube.
Definition at line 347 of file GCOMDri.hpp.
|
protected |
Initialise DRI cube.
Sets all DRI cube bins to zero.
Definition at line 1154 of file GCOMDri.cpp.
References size().
Referenced by compute_dre(), compute_drg(), and compute_drx().
|
protected |
Initialise class members.
Definition at line 1080 of file GCOMDri.cpp.
References GCOMSelection::clear(), GGti::clear(), GEbounds::clear(), GSkyMap::clear(), init_statistics(), m_dri, m_ebounds, m_gti, m_has_selection, m_name, m_phasecor, m_phibin, m_phimin, m_selection, m_tofcor, and m_zetamin.
Referenced by clear(), GCOMDri(), and operator=().
|
protected |
Initialise computation statistics.
Definition at line 1169 of file GCOMDri.cpp.
References GTime::clear(), m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_tstart, and m_tstop.
Referenced by compute_dre(), compute_drg(), compute_drx(), and init_members().
void GCOMDri::load | ( | const GFilename & | filename | ) |
Load COMPTEL Data Space from DRI FITS file.
[in] | filename | DRI FITS file name. |
Definition at line 893 of file GCOMDri.cpp.
References GFits::close(), GFits::image(), and read().
Referenced by GCOMDri(), and GCOMModelDRM::read().
|
inline |
Return DRI sky map.
Definition at line 267 of file GCOMDri.hpp.
References m_dri.
Referenced by GCOMObservation::check_dri(), GCOMObservation::compute_drb_bgdlixa(), GCOMObservation::compute_drb_bgdlixe(), GCOMObservation::compute_drb_phinor(), GCOMModelDRM::eval(), GCOMModelDRBPhibarNodes::eval(), GCOMModelDRBPhibarBins::eval(), GCOMDri(), GCOMObservation::get_weighted_drg_map(), GCOMResponse::irf(), GCOMResponse::irf_diffuse(), GCOMResponse::irf_elliptical(), GCOMResponse::irf_ptsrc(), GCOMResponse::irf_radial(), GCOMObservation::load_drb(), GCOMObservation::load_drg(), GCOMObservation::load_drx(), GCOMObservation::print(), GCOMEventCube::set_scatter_directions(), and GCOMObservation::use_event_for_likelihood().
|
inline |
Return DRI cube name.
Definition at line 279 of file GCOMDri.hpp.
References m_name.
Referenced by name().
|
inline |
Set DRI cube name.
[in] | name | DRI cube name. |
Sets the name of the DRI cube.
Definition at line 293 of file GCOMDri.hpp.
|
inline |
Return number of Chi bins.
Definition at line 231 of file GCOMDri.hpp.
References m_dri, and GSkyMap::nx().
Referenced by GCOMObservation::compute_drb_bgdlixa(), GCOMObservation::compute_drb_bgdlixe(), compute_drm(), GCOMEventCube::naxis(), GCOMEventCube::print(), and GCOMEventCube::set_scatter_directions().
|
inline |
Return number of Phibar bins.
Definition at line 255 of file GCOMDri.hpp.
References m_dri, and GSkyMap::nmaps().
Referenced by GCOMObservation::compute_drb_bgdlixa(), GCOMObservation::compute_drb_bgdlixe(), GCOMObservation::compute_drb_phinor(), compute_dre(), compute_drg(), compute_drm(), cone_content(), GCOMEventCube::dim(), GCOMObservation::get_bgdlixa_phibar_indices(), GCOMEventCube::naxis(), GCOMEventCube::print(), and GCOMEventCube::set_scatter_angles().
|
inline |
Return number of Psi bins.
Definition at line 243 of file GCOMDri.hpp.
References m_dri, and GSkyMap::ny().
Referenced by GCOMObservation::compute_drb_bgdlixa(), GCOMObservation::compute_drb_bgdlixe(), compute_drm(), GCOMEventCube::naxis(), GCOMEventCube::print(), and GCOMEventCube::set_scatter_directions().
|
inline |
Return number of superpackets skipped for DRI.
Returns the number of superpackets skipped for DRI.
Definition at line 506 of file GCOMDri.hpp.
References m_num_skipped_superpackets.
|
inline |
Set number of superpackets skipped for DRI.
[in] | number | Number of superpackets skipped for DRI. |
Set the number of superpackets skipped for DRI.
Definition at line 520 of file GCOMDri.hpp.
References m_num_skipped_superpackets, and gammalib::number().
|
inline |
Return number of superpackets read for DRI.
Returns the number of superpackets read for DRI.
Definition at line 448 of file GCOMDri.hpp.
References m_num_superpackets.
|
inline |
Set number of superpackets read for DRI.
[in] | number | Number of superpackets read for DRI. |
Set the number of superpackets read for DRI.
Definition at line 462 of file GCOMDri.hpp.
References m_num_superpackets, and gammalib::number().
|
inline |
Return number of superpackets used for DRI.
Returns the number of superpackets used for DRI.
Definition at line 477 of file GCOMDri.hpp.
References m_num_used_superpackets.
|
inline |
Set number of superpackets used for DRI.
[in] | number | Number of superpackets used for DRI. |
Set the number of superpackets used for DRI.
Definition at line 491 of file GCOMDri.hpp.
References m_num_used_superpackets, and gammalib::number().
Assignment operator.
[in] | dri | COMPTEL Data Space. |
Definition at line 198 of file GCOMDri.cpp.
References copy_members(), free_members(), and init_members().
|
inline |
DRI bin access operators.
[in] | index | DRI bin index [0,...,size()-1]. |
Definition at line 194 of file GCOMDri.hpp.
References m_dri, and GSkyMap::pixels().
|
inline |
DRI bin access operators (const version)
[in] | index | DRI bin index [0,...,size()-1]. |
Definition at line 207 of file GCOMDri.hpp.
References m_dri, and GSkyMap::pixels().
|
inline |
Return pulsar phase correction factor.
Returns the pulsar phase correction factor that corrects for the phase selection for pulsar analysis.
Definition at line 418 of file GCOMDri.hpp.
References m_phasecor.
Referenced by GCOMResponse::irf(), GCOMResponse::irf_diffuse(), GCOMResponse::irf_elliptical(), GCOMResponse::irf_ptsrc(), GCOMResponse::irf_radial(), and GCOMEventCube::print().
|
inline |
Set pulsar phase correction factor.
[in] | phasecor | Pulsar phase correction factor. |
Set the pulsar phase correction factor that corrects for the phase selection for pulsar analysis.
Definition at line 433 of file GCOMDri.hpp.
References m_phasecor.
|
inline |
Return Compton scatter angle bin of DRI cube.
Definition at line 372 of file GCOMDri.hpp.
References m_phibin.
Referenced by cone_content(), GCOMDri(), and GCOMEventCube::set_scatter_angles().
|
inline |
Return minimum Compton scatter angle of DRI cube.
Definition at line 360 of file GCOMDri.hpp.
References m_phimin.
Referenced by cone_content(), GCOMDri(), and GCOMEventCube::set_scatter_angles().
Print COMPTEL Data Space.
[in] | chatter | Chattiness. |
Implements GBase.
Definition at line 988 of file GCOMDri.cpp.
References GWcs::cdelt(), GWcs::crpix(), GWcs::crval(), EXPLICIT, m_dri, m_ebounds, m_gti, m_has_selection, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phibin, m_phimin, m_selection, m_tofcor, GSkyMap::nmaps(), GSkyMap::nx(), GSkyMap::ny(), gammalib::parformat(), GCOMSelection::print(), GGti::print(), GEbounds::print(), GSkyMap::print(), GSkyMap::projection(), gammalib::reduce(), SILENT, and gammalib::str().
Referenced by GCOMEventCube::print().
void GCOMDri::read | ( | const GFitsImage & | image | ) |
Read COMPTEL Data Space from DRI FITS image.
[in] | image | DRI FITS image. |
Definition at line 942 of file GCOMDri.cpp.
References clear(), gammalib::com_wcs_mer2car(), m_dri, GSkyMap::read(), and read_attributes().
Referenced by load(), GCOMObservation::load_drb(), GCOMObservation::load_drg(), GCOMObservation::load_drx(), and GCOMEventCube::read().
|
protected |
Read DRI attributes from FITS HDU.
[in] | hdu | FITS HDU pointer. |
Reads the time interval from the FITS header and sets the Phibar definiton and energy boundaries from the header keywords if they are provided.
Definition at line 1266 of file GCOMDri.cpp.
References GEbounds::clear(), gammalib::com_time(), GFitsHDU::has_card(), GFitsHDU::integer(), m_ebounds, m_gti, m_has_selection, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phasecor, m_phibin, m_phimin, m_selection, m_tofcor, m_zetamin, GCOMSelection::read(), and GFitsHDU::real().
Referenced by read().
void GCOMDri::save | ( | const GFilename & | filename, |
const bool & | clobber = false |
||
) | const |
Save COMPTEL Data Space into DRI FITS file.
[in] | filename | DRI FITS file name. |
[in] | clobber | Overwrite existing file? |
Definition at line 918 of file GCOMDri.cpp.
References GFits::close(), GFilename::extname(), gammalib::extname_dri, GFits::saveto(), and write().
|
inline |
Return number of bins.
Definition at line 219 of file GCOMDri.hpp.
References m_dri, GSkyMap::nmaps(), and GSkyMap::npix().
Referenced by compute_drg(), compute_drx(), compute_overlap(), init_cube(), GCOMEventCube::number(), and GCOMEventCube::size().
|
inline |
Return ToF correction factor.
Returns the ToF correction factor that corrects for the event selection in a ToF window.
Definition at line 387 of file GCOMDri.hpp.
References m_tofcor.
Referenced by GCOMResponse::irf(), GCOMResponse::irf_diffuse(), GCOMResponse::irf_elliptical(), GCOMResponse::irf_ptsrc(), GCOMResponse::irf_radial(), and GCOMEventCube::print().
|
inline |
Set ToF correction factor.
[in] | tofcor | ToF correction factor. |
Set the ToF correction factor that corrects for the event selection in a ToF window.
Definition at line 402 of file GCOMDri.hpp.
References m_tofcor.
|
protected |
Check if superpacket should be used.
[in] | oad | Orbit Aspect Data record (i.e. superpacket). |
[in] | tim | Good Time Intervals. |
[in] | select | Selection set. |
Checks if a superpacket should be used. A superpacket will be used if it is fully enclosed within the COMPTEL Good Time Intervals and the Good Time Intervals of the DRI dataset. In case that orbital phases are present in the selection set, the superpacket will be used when the start time is comprised in one of the orbital phases.
The method updates the superpacket statistics and selected time interval.
Definition at line 1199 of file GCOMDri.cpp.
References GPhases::contains(), GCOMTim::contains(), GGti::contains(), GPhases::is_empty(), m_gti, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_tstart, m_tstop, GCOMSelection::orbital_phase(), GCOMSelection::orbital_phases(), GGti::size(), GCOMOad::tstart(), and GCOMOad::tstop().
Referenced by compute_dre(), compute_drg(), and compute_drx().
void GCOMDri::write | ( | GFits & | fits, |
const std::string & | extname = "" |
||
) | const |
Write COMPTEL Data Space into FITS image.
[in] | fits | FITS file. |
[in] | extname | Extension name. |
Definition at line 967 of file GCOMDri.cpp.
References m_dri, GSkyMap::write(), and write_attributes().
Referenced by save(), and GCOMEventCube::write().
|
protected |
Write DRI attributes into FITS HDU.
[in] | hdu | FITS HDU pointer. |
Definition at line 1356 of file GCOMDri.cpp.
References GFitsHDU::card(), gammalib::com_tics(), gammalib::com_tjd(), GEbounds::emax(), GEbounds::emin(), GCOMSelection::fpmtflag(), m_ebounds, m_gti, m_has_selection, m_num_skipped_superpackets, m_num_superpackets, m_num_used_superpackets, m_phasecor, m_phibin, m_phimin, m_selection, m_tofcor, m_zetamin, GEnergy::MeV(), GGti::reference(), GTime::secs(), GEbounds::size(), GGti::tstart(), GGti::tstop(), GCOMSelection::use_d1(), GCOMSelection::use_d2(), GTime::utc(), and GCOMSelection::write().
Referenced by write().
|
protected |
Data cube.
Definition at line 153 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drm(), compute_drx(), cone_content(), copy_members(), GCOMDri(), init_members(), map(), nchi(), nphibar(), npsi(), operator[](), print(), read(), size(), and write().
|
protected |
Energy boundaries of data cube.
Definition at line 154 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), compute_tof_correction(), copy_members(), ebounds(), init_members(), print(), read_attributes(), and write_attributes().
|
protected |
Good Time Intervals of data cube.
Definition at line 155 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), gti(), init_members(), print(), read_attributes(), use_superpacket(), and write_attributes().
|
protected |
Signal that selection was applied.
Definition at line 169 of file GCOMDri.hpp.
Referenced by compute_dre(), copy_members(), init_members(), print(), read_attributes(), and write_attributes().
|
protected |
Data cube name.
Definition at line 152 of file GCOMDri.hpp.
Referenced by copy_members(), init_members(), and name().
|
protected |
Number of skipped superpackets.
Definition at line 166 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), init_statistics(), num_skipped_superpackets(), print(), read_attributes(), use_superpacket(), and write_attributes().
|
protected |
Number of superpackets.
Definition at line 164 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), init_statistics(), num_superpackets(), print(), read_attributes(), use_superpacket(), and write_attributes().
|
protected |
Number of used superpackets.
Definition at line 165 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), init_statistics(), num_used_superpackets(), print(), read_attributes(), use_superpacket(), and write_attributes().
|
protected |
Pulsar phase correction.
Definition at line 159 of file GCOMDri.hpp.
Referenced by compute_dre(), copy_members(), init_members(), phase_correction(), read_attributes(), and write_attributes().
|
protected |
Phibar binsize (deg)
Definition at line 157 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), copy_members(), GCOMDri(), init_members(), phibin(), print(), read_attributes(), and write_attributes().
|
protected |
Phibar minimum (deg)
Definition at line 156 of file GCOMDri.hpp.
Referenced by compute_dre(), copy_members(), GCOMDri(), init_members(), phimin(), print(), read_attributes(), and write_attributes().
|
protected |
Selection parameters.
Definition at line 170 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_tof_correction(), copy_members(), init_members(), print(), read_attributes(), and write_attributes().
|
protected |
ToF correction.
Definition at line 158 of file GCOMDri.hpp.
Referenced by compute_tof_correction(), copy_members(), init_members(), print(), read_attributes(), tof_correction(), and write_attributes().
|
protected |
Selection start time.
Definition at line 162 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), init_statistics(), and use_superpacket().
|
protected |
Selection stop time.
Definition at line 163 of file GCOMDri.hpp.
Referenced by compute_dre(), compute_drg(), compute_drx(), copy_members(), init_statistics(), and use_superpacket().
|
protected |
Minimum zeta angle.
Definition at line 171 of file GCOMDri.hpp.
Referenced by compute_dre(), copy_members(), init_members(), read_attributes(), and write_attributes().