53 #define G_COMPUTE_DRE "GCOMDri::compute_dre(GCOMObservation&, "\
54 "GCOMSelection&, double&)"
55 #define G_COMPUTE_DRX "GCOMDri::compute_drx(GCOMObservation&, "\
56 "GCOMSelection&, double&)"
57 #define G_COMPUTE_DRM "GCOMDri::compute_drm(GCOMObservation&, GModel&)"
58 #define G_COMPUTE_TOF_CORRECTION "GCOMDri::compute_tof_correction()"
72 const double r1 = 13.8;
127 const double& phimin,
128 const double& phibin,
267 const double& zetamin)
270 #if defined(G_DEBUG_COMPUTE_DRE)
271 std::cout <<
"GCOMDri::compute_dre" << std::endl;
272 std::cout <<
"====================" << std::endl;
277 if (events == NULL) {
278 std::string msg =
"No event list found in COMPTEL observation. Please "
279 "specify an observation that contains an event list.";
285 std::string msg =
"DRE cube has a non-positive Phibar bin size. Please "
286 "specify a DRE cube with a positive Phibar bin size.";
311 int num_used_events = 0;
312 int num_event_outside_sp = 0;
313 int num_energy_too_low = 0;
314 int num_energy_too_high = 0;
315 int num_eha_too_small = 0;
316 int num_phibar_too_low = 0;
317 int num_phibar_too_high = 0;
318 int num_outside_dre = 0;
319 int num_event_before_dre = 0;
320 int num_event_after_dre = 0;
321 int num_processed = 0;
327 bool terminate =
false;
344 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
356 double theta_geocentre = double(oad.
gcel());
357 double phi_geocentre = double(oad.
gcaz());
358 sky_geocentre.
radec_deg(phi_geocentre, 90.0-theta_geocentre);
362 for (; i_evt < events->
size(); ++i_evt) {
368 if (event->time() > oad.
tstop()) {
380 num_event_before_dre++;
386 num_event_after_dre++;
394 if (event->time() < oad.
tstart()) {
395 num_event_outside_sp++;
401 num_energy_too_low++;
405 num_energy_too_high++;
417 num_phibar_too_low++;
420 else if (iphibar >=
nphibar()) {
421 num_phibar_too_high++;
426 #if defined(G_CHECK_EHA_COMPUTATION)
428 double theta_event = double(event->theta());
429 double phi_event = double(event->phi());
430 sky_event.
radec_deg(-phi_event, 90.0-theta_event);
432 if (
std::abs(eha - event->eha()) > 1.5) {
433 std::string msg =
"Earth horizon angle from EVP dataset ("+
435 "differs from Earth horizon angle "
436 "computed from Orbit Aspect Data ("+
445 double ehamin = double(iphibar) *
m_phibin + zetamin;
446 if (event->eha() < ehamin) {
470 tdelta = ephem.
geo2ssb(ephemeris.
dir(),
event->time(), oad.
pos()) +
471 event->time().utc2tt();
476 GTime time =
event->time() + tdelta;
480 double phase = ephemeris.
phase(time,
"UTC");
509 if (terminate || i_evt >= events->
size()) {
521 #if defined(G_DEBUG_COMPUTE_DRE)
525 std::cout <<
"Total number of events .......: " << events.
size() << std::endl;
526 std::cout <<
"Processed events .............: " << num_processed << std::endl;
527 std::cout <<
"Used events ..................: " << num_used_events << std::endl;
528 std::cout <<
"Events outside superpacket ...: " << num_event_outside_sp << std::endl;
529 std::cout <<
"Events before DRE GTI ........: " << num_event_before_dre << std::endl;
530 std::cout <<
"Events after DRE GTI .........: " << num_event_after_dre << std::endl;
531 std::cout <<
"Energy too low ...............: " << num_energy_too_low << std::endl;
532 std::cout <<
"Energy too high ..............: " << num_energy_too_high << std::endl;
533 std::cout <<
"Phibar too low ...............: " << num_phibar_too_low << std::endl;
534 std::cout <<
"Phibar too high ..............: " << num_phibar_too_high << std::endl;
535 std::cout <<
"Outside DRE cube .............: " << num_outside_dre << std::endl;
536 std::cout <<
"Earth horizon angle too small : " << num_eha_too_small << std::endl;
559 const double& zetamin)
562 #if defined(G_DEBUG_COMPUTE_DRG)
563 std::cout <<
"GCOMDri::compute_drg" << std::endl;
564 std::cout <<
"====================" << std::endl;
589 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
605 double theta_geocentre = double(oad.
gcel());
606 double phi_geocentre = double(oad.
gcaz());
608 geocentre_comptel.
radec_deg(phi_geocentre, 90.0-theta_geocentre);
611 for (
int index = 0; index <
m_dri.
npix(); ++index) {
617 double theta = oad.
theta(sky);
618 double phi = oad.
phi(sky);
627 chipsi_comptel.
radec_deg(phi, 90.0-theta);
628 double eha = geocentre_comptel.dist_deg(chipsi_comptel) - oad.
georad();
631 for (
int iphibar = 0; iphibar <
nphibar(); ++iphibar) {
634 double ehamin = double(iphibar) *
m_phibin + zetamin;
639 int inx = index + iphibar *
m_dri.
npix();
640 (*this)[inx] += geometry;
652 for (
int i = 0; i <
size(); ++i) {
666 #if defined(G_DEBUG_COMPUTE_DRG)
706 #if defined(G_DEBUG_COMPUTE_DRX)
707 std::cout <<
"GCOMDri::compute_drx" << std::endl;
708 std::cout <<
"====================" << std::endl;
712 const double tau = 0.2;
729 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
740 for (
int index = 0; index <
m_dri.
npix(); ++index) {
746 double theta = oad.
theta(sky);
749 double exposure = 0.0;
760 exposure =
d1_area * costheta *
770 (*this)[index] += exposure;
777 for (
int i = 0; i <
size(); ++i) {
790 #if defined(G_DEBUG_COMPUTE_DRX)
819 for (
int iphibar = 0, i = 0; iphibar <
nphibar(); ++iphibar) {
820 for (
int ipix = 0; ipix < npix; ++ipix, ++i) {
821 m_dri(ipix, iphibar) = values[i];
846 const double& armmin,
847 const double& armmax)
const
850 double content = 0.0;
854 for (
int i = 0; i < phigeo.
npix(); ++i) {
859 for (
int iphibar = 0; iphibar < this->
nphibar(); ++iphibar) {
862 double phibar = this->
phimin() + (iphibar+0.5) * this->
phibin();
865 int offset = iphibar * phigeo.
npix();
868 for (
int i = 0; i < phigeo.
npix(); ++i) {
871 double arm = phibar - phigeo(i);
874 if (arm >= armmin && arm < armmax) {
875 content += (*this)[i + offset];
895 GFits fits(filename);
904 for (
int i = 0; i < fits.
size(); ++i) {
940 fits.
saveto(filename, clobber);
1010 double chimin = 0.0;
1011 double chimax = 0.0;
1012 double chibin = 0.0;
1013 double psimin = 0.0;
1014 double psimax = 0.0;
1015 double psibin = 0.0;
1018 chibin = wcs->
cdelt(0);
1019 chimin = wcs->
crval(0) - (wcs->
crpix(0)-0.5) * chibin;
1020 chimax = chimin +
m_dri.
nx() * chibin;
1021 psibin = wcs->
cdelt(1);
1022 psimin = wcs->
crval(1) - (wcs->
crpix(1)-0.5) * psibin;
1023 psimax = psimin +
m_dri.
ny() * psibin;
1030 result.append(
"=== GCOMDri ===");
1186 for (
int i = 0; i <
size(); ++i) {
1302 if (tstop > tstart) {
1395 hdu->
card(
"CTYPE3",
"Phibar",
"Compton scatter angle");
1396 hdu->
card(
"CRPIX3", 1.0,
"Pixel coordinate of reference point (starting from 1)");
1397 hdu->
card(
"CRVAL3", crval3,
"[deg] Coordinate value at reference point");
1398 hdu->
card(
"CDELT3",
m_phibin,
"[deg] Coordinate increment at reference point");
1416 hdu->
card(
"VISDAY", visday,
"[TJD] Data validity interval start day");
1417 hdu->
card(
"VISTIM", vistim,
"[tics] Data validity interval start time");
1418 hdu->
card(
"VIEDAY", vieday,
"[TJD] Data validity interval end day");
1419 hdu->
card(
"VIETIM", vietim,
"[tics] Data validity interval end time");
1438 std::string d1use =
"0000000";
1439 for (
int i = 0; i < 7; ++i) {
1444 hdu->
card(
"D1USE", d1use,
"D1 module usage");
1447 std::string d2use =
"00000000000000";
1448 for (
int i = 0; i < 14; ++i) {
1453 hdu->
card(
"D2USE", d2use,
"D2 module usage");
1459 hdu->
card(
"EHAMIN",
m_zetamin,
"[deg] Minimum Earth horizon - Phibar cut");
1482 hdu->
card(
"DRWFITIT",
m_drw_iter,
"DRW f_prompt fit iterations");
1507 const double& theta,
1513 const double xd1[] = {0.0,-42.3,-26.0,26.0, 42.3,26.0,-26.0};
1514 const double yd1[] = {0.0, 0.0, 39.1,39.1, 0.0,-39.1,-39.1};
1517 const double xd2[] = { 30.2, 0.0, -30.2, 45.3, 15.1, -15.1, -45.3,
1518 45.3, 15.1, -15.1, -45.3, 30.2, 0.0, -30.2};
1519 const double yd2[] = {-41.254,-41.254,-41.254,-15.1, -15.1, -15.1, -15.1,
1520 15.1, 15.1, 15.1 , 15.1, 41.254,41.254,41.254};
1524 const double delz = 158.0;
1530 const double r2 = 14.085;
1534 const double r2sq = r2 * r2;
1535 const double drsq =
r1sq - r2sq;
1539 double geometry = 0.0;
1546 double tantheta =
std::tan(theta_rad);
1549 for (
int id1 = 0; id1 < 7; ++id1) {
1552 if (status.
d1status(tjd, id1+1) != 1) {
1557 double xd1_prj = xd1[id1] - delz * tantheta * cosphi;
1558 double yd1_prj = yd1[id1] - delz * tantheta * sinphi;
1561 for (
int id2 = 0; id2 < 14; ++id2) {
1569 int d2status = status.
d2status(tjd, id2+1);
1573 if ((d2status < 1) || ((d2status > 1) && (select.
fpmtflag() == 0))) {
1579 double dx = xd2[id2] - xd1_prj;
1580 double dy = yd2[id2] - yd1_prj;
1581 double dsq = dx * dx + dy * dy;
1593 double overlap = 0.0;
1594 if ((d2status > 1) && (select.
fpmtflag() == 2)) {
1598 xd2[id2], yd2[id2], r2,
1610 if (d <= r2 -
r1 + 0.1) {
1611 double gmt = (1.0 > overlap) ? 1.0 - overlap : 0.0;
1621 double d2 = 2.0 * d;
1622 double cbeta1 = (dsq + drsq) / (d2 *
r1);
1623 double cbeta2 = (dsq - drsq) / (d2 * r2);
1626 double sbeta1 =
std::sqrt(1.0 - cbeta1 * cbeta1);
1627 double sbeta2 =
std::sqrt(1.0 - cbeta2 * cbeta2);
1634 double gmt = (
r1sq * (beta1 - sbeta1 * cbeta1) +
1635 r2sq * (beta2 - sbeta2 * cbeta2)) * norm_geo -
1674 const double& x2,
const double& y2,
const double& r2)
const
1677 double surface = 0.0;
1680 double dx = x1 - x2;
1681 double dy = y1 - y2;
1682 double dsq = dx * dx + dy * dy;
1694 else if (r2 > (d+r1)) {
1700 else if (d < (r1+r2)) {
1703 double d2 = 2.0 * d;
1705 double r2sq = r2 * r2;
1706 double cbeta1 = (r1sq - r2sq + dsq) / (d2 * r1);
1707 double cbeta2 = (r2sq - r1sq + dsq) / (d2 * r2);
1710 double sbeta1 =
std::sqrt(1.0 - cbeta1 * cbeta1);
1711 double sbeta2 =
std::sqrt(1.0 - cbeta2 * cbeta2);
1718 surface = r1sq * (beta1 - sbeta1 * cbeta1) +
1719 r2sq * (beta2 - sbeta2 * cbeta2);
1748 const double& x2,
const double& y2,
const double& r2,
1749 const double& x3,
const double& y3,
const double& r3)
const
1752 const int steps = 25;
1753 const int size = steps*steps;
1754 static double o23_x[
size];
1755 static double o23_y[
size];
1756 static double last_x2 = 1.0e25;
1757 static double last_y2 = 1.0e25;
1758 static double last_x3 = 1.0e25;
1759 static double last_y3 = 1.0e25;
1760 static int no23 = 0;
1763 double overlap = 0.0;
1770 double dx12 = x1 - x2;
1771 double dy12 = y1 - y2;
1772 double d12 =
std::sqrt(dx12*dx12 + dy12*dy12);
1773 if (d12 > (r1+r2)) {
1779 double dx13 = x1 - x3;
1780 double dy13 = y1 - y3;
1781 double d13 =
std::sqrt(dx13*dx13 + dy13*dy13);
1782 if (d13 > (r1+r3)) {
1800 double step = 2.0 * r3 / double(steps-3);
1801 double stepsq = step * step;
1803 if ((last_x2 != x2) || (last_y2 != y2) || (last_x3 != x3) || (last_y3 != y3)) {
1813 double r2sq = r2 * r2;
1814 double r3sq = r3 * r3;
1816 double yy = y3 - r3 - step;
1817 for (
int i = 0; i < steps; ++i, yy += step) {
1818 double xx = x3 - r3 - step;
1819 for (
int j = 0; j < steps; ++j, xx += step) {
1820 double dx3 = xx - x3;
1821 double dy3 = yy - y3;
1822 if (dx3*dx3 + dy3*dy3 < r3sq) {
1823 double dx2 = xx - x2;
1824 double dy2 = yy - y2;
1825 if (dx2*dx2 + dy2*dy2 < r2sq) {
1838 for (
int i = 0; i < no23; ++i) {
1839 double dx1 = o23_x[i] - x1;
1840 double dy1 = o23_y[i] - y1;
1841 if (dx1*dx1 + dy1*dy1 < r1sq) {
1849 if (overlap > 0.0) {
1866 const double tofcoreng[] = {0.8660, 1.7321, 5.4772, 17.3205};
1867 const double tofcor110[] = {1.14, 1.07, 1.02, 1.01};
1868 const double tofcor111[] = {1.17, 1.09, 1.03, 1.01};
1869 const double tofcor112[] = {1.21, 1.11, 1.05, 1.02};
1870 const double tofcor113[] = {1.26, 1.15, 1.07, 1.04};
1871 const double tofcor114[] = {1.32, 1.20, 1.11, 1.06};
1872 const double tofcor115[] = {1.40, 1.27, 1.17, 1.11};
1873 const double tofcor116[] = {1.50, 1.36, 1.24, 1.17};
1874 const double tofcor117[] = {1.63, 1.47, 1.35, 1.28};
1875 const double tofcor118[] = {1.79, 1.63, 1.51, 1.43};
1876 const double tofcor119[] = {2.01, 1.85, 1.73, 1.67};
1877 const double* tofcor[] = {tofcor110, tofcor111, tofcor112,
1878 tofcor113, tofcor114, tofcor115,
1879 tofcor116, tofcor117, tofcor118,
1884 std::string msg =
"Minimum of ToF selection window "+
1886 " is smaller than 110. No ToF correction is "
1887 "available for this value.";
1891 std::string msg =
"Minimum of ToF selection window "+
1893 " is larger than 119. No ToF correction is "
1894 "available for this value.";
1898 std::string msg =
"Maximum of ToF selection window "+
1900 " is not 130. No ToF correction is available for "
1914 nodes.set_value(energy);
1920 m_tofcor = tofcor[i][nodes.inx_left()] * nodes.wgt_left() +
1921 tofcor[i][nodes.inx_right()] * nodes.wgt_right();
bool contains(const GTime &time) const
Checks whether Good Time Intervals contains time.
COMPTEL instrument status class.
double m_drw_fprompt
DRW fitted fprompt parameter.
double length(void) const
Returns total length of phase intervals.
COMPTEL instrument status class definition.
const bool & use_d2(const int &id2) const
Return D2 module usage flag.
double dist_deg(const GSkyDir &dir) const
Compute angular distance between sky directions in degrees.
Abstract FITS image base class.
const GPhases & pulsar_phases(void) const
Return pulsar phases.
const GCOMOads & oads(void) const
Return Orbit Aspect Data.
bool has_card(const int &cardno) const
Check existence of header card.
const int & ny(void) const
Returns number of pixels in y coordinate.
double norm(const GVector &vector)
Computes vector norm.
int pix2inx(const GSkyPixel &pixel) const
Converts sky map pixel into pixel index.
const GSkyProjection * projection(void) const
Returns pointer to sky projection.
Point source spatial model class interface definition.
void warning(const std::string &origin, const std::string &message)
Emits warning.
GTime m_tstart
Selection start time.
GCOMSelection m_selection
Selection parameters.
const double & phimin(void) const
Return minimum Compton scatter angle of DRI cube.
GSkyMap extract(const int &map, const int &nmaps=1) const
Extract maps into a new sky map object.
const double superpacket_duration
double m_tofcor
ToF correction.
const GCOMBvcs & bvcs(void) const
Return Solar System Barycentre Data.
int size(void) const
Return number of bins.
GVector abs(const GVector &vector)
Computes absolute of vector elements.
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.
Abstract FITS extension base class.
int size(void) const
Return number of energy boundaries.
GVector cos(const GVector &vector)
Computes cosine of vector elements.
COMPTEL Data Space class definition.
COMPTEL event list class definition.
const GSkyDir & dir(void) const
Returns pulsar sky direction.
double m_phibin
Phibar binsize (deg)
virtual double eval(const GEvent &event, const GObservation &obs, const bool &gradients=false) const =0
void compute_drg(const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection(), const double &zetamin=5.0)
Compute geometry cube.
int m_drw_iter
DRW fitting iterations.
void write_attributes(GFitsHDU *hdu) const
Write DRI attributes into FITS HDU.
COMPTEL observation class interface definition.
const float & gcel(void) const
Return Geocentre zenith angle.
void clear(void)
Clear time.
double acos(const double &arg)
Computes acos by avoiding NaN due to rounding errors.
std::string extname(const std::string &defaultname="") const
Return extension name.
Abstract spatial model base class interface definition.
int m_num_superpackets
Number of superpackets.
double crval(const int &inx) const
Return value of reference pixel.
double MeV(void) const
Return energy in MeV.
double phi(const GSkyDir &sky) const
Return azimuth angle of sky direction in COMPTEL coordinates.
const GTime & tstop(void) const
Return stop time of superpacket.
int size(void) const
Return number of Orbit Aspect Data in container.
FITS file class interface definition.
int nchi(void) const
Return number of Chi bins.
std::string m_drw_method
DRW method.
GCOMDri(void)
Void constructor.
GTime com_time(const int &tjd, const int &tics)
Convert TJD and COMPTEL tics in GTime object.
COMPTEL selection set class.
COMPTEL Good Time Intervals class definition.
const int & tof_min(void) const
Return minimum of ToF selection window.
double orbital_phase(const GTime &time) const
Return orbital phase for a given time.
std::string print(const GChatter &chatter=NORMAL) const
Print Good Time Intervals.
const float & georad(void) const
Return apparent radius of Earth.
void read(const GFitsHDU &hdu)
Read skymap from FITS HDU.
const double & com_exd2r(const int &id2)
Return D2 module exclusion region radius.
bool is_empty(void) const
Signals if there are no Solar System Barycentre Data in container.
COMPTEL Orbit Aspect Data class.
bool is_empty(void) const
Signal if there are no phase intervals.
Implementation of support function used by COMPTEL classes.
int size(void) const
Return number of Good Time Intervals.
virtual void clear(void)
Clear binary table.
Abstract FITS image base class definition.
const GPulsarEphemeris & ephemeris(const GTime &time) const
Return pulsar ephemeris.
const int & fpmtflag(void) const
Return failed PMT flag for D2 modules.
double tdelta(const GSkyDir &dir, const GTime &time) const
Return time difference between photon arrival time at CGRO and the Solar System Barycentre (SSB) ...
const GTime & tstart(void) const
Return start time of superpacket.
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.
COMPTEL selection set class definition.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
std::string print(const GChatter &chatter=NORMAL) const
Print sky map.
double real(const std::string &keyname) const
Return card value as double precision.
void copy_members(const GCOMDri &dri)
Copy class members.
void reference(const GTimeReference &ref)
Set time reference for Good Time Intervals.
const GCOMTim & tim(void) const
Return COMPTEL Good Time Intervals.
Node array class interface definition.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
double crpix(const int &inx) const
Return reference pixel.
void clear(void)
Clear Good Time Intervals.
Ephemerides class definition.
virtual GCOMDri * clone(void) const
Clone COMPTEL Data Space.
const GVector & pos(void) const
Return telescope position vector (km)
double cone_content(const GSkyDir &dir, const double &armmin, const double &armmax) const
Compute content in cone.
void write(GFitsHDU &hdu) const
Write selection set keywords into FITS HDU.
virtual int size(void) const
Return number of events in list.
bool contains(const GTime &time) const
Check if time is comprised in the Good Time Intervals.
Energy boundaries container class.
bool has_pulsar(void) const
Signals that pulsar selection should be performed.
const int & nmaps(void) const
Returns number of maps.
GSkyDir inx2dir(const int &index) const
Returns sky direction of pixel.
GVector tan(const GVector &vector)
Computes tangens of vector elements.
const double & com_exd2y(const int &id2)
Return D2 module exclusion region Y position.
void init_cube(void)
Initialise DRI cube.
GFitsHDU * write(GFits &file, const std::string &extname="") const
Write sky map into FITS file.
double m_phasecor
Pulsar phase correction.
GTime m_tstop
Selection stop time.
const GEnergy & emin(void) const
Return minimum energy of all intervals.
void write(GFits &fits, const std::string &extname="") const
Write COMPTEL Data Space into FITS image.
void compute_drm(const GCOMObservation &obs, const GModel &model)
Compute DRM model.
void com_wcs_mer2car(GSkyMap &map)
Changes Mercator's projection to cartesian projection.
bool m_has_selection
Signal that selection was applied.
double geo2ssb(const GSkyDir &srcdir, const GTime &time) const
Get time difference between geocentric and SSB (seconds)
const GSkyMap & map(void) const
Return DRI sky map.
int com_tjd(const GTime &time)
Convert GTime in COMPTEL TJD.
double cdelt(const int &inx) const
Return pixel size.
double compute_geometry(const int &tjd, const double &theta, const double &phi, const GCOMSelection &select, const GCOMStatus &status) const
Compute DRG geometry factor.
bool contains(const double &phase) const
Check whether phase is contained in phases.
void init_statistics(void) const
Initialise selection statistics.
bool contains(const GSkyDir &dir) const
Checks if sky direction falls in map.
int m_num_skipped_superpackets
Number of skipped superpackets.
const double & com_exd2x(const int &id2)
Return D2 module exclusion region X position.
std::string m_drw_status
DRW fitting status.
std::string print(const GChatter &chatter=NORMAL) const
Print energy boundaries.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL selection set.
int integer(const std::string &keyname) const
Return card value as integer.
void free_members(void)
Delete class members.
void save(const GFilename &filename, const bool &clobber=false) const
Save COMPTEL Data Space into DRI FITS file.
void clear(void)
Clear instance.
Good Time Interval class.
int d1status(const int &tjd, const int &module) const
Return D1 module status.
const bool & use_d1(const int &id1) const
Return D1 module usage flag.
void radec_deg(const double &ra, const double &dec)
Set equatorial sky direction (degrees)
const GTime & tstop(void) const
Returns latest stop time in Good Time Intervals.
const GPulsar & pulsar(void) const
Return pulsar.
virtual ~GCOMDri(void)
Destructor.
const GTime & tstart(void) const
Returns earliest start time in Good Time Intervals.
void clear(void)
Clear energy boundaries.
void compute_drx(const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection())
Compute DRX exposure map.
int nphibar(void) const
Return number of Phibar bins.
const int & nrows(void) const
Return number of rows in table.
GCOMDri & operator=(const GCOMDri &dri)
Assignment operator.
bool use_event(const GCOMEventAtom &event) const
Check if event should be used.
void compute_tof_correction(void)
Compute ToF correction.
const std::string extname_dri
int d2status(const int &tjd, const int &module) const
Return D2 module status.
GFitsImage * image(const int &extno)
Get pointer to image HDU.
const double & secs(void) const
Return time in seconds in native reference (TT)
Abstract world coordinate system base class.
int com_tics(const GTime &time)
Convert GTime in COMPTEL tics.
GSkyPixel dir2pix(const GSkyDir &dir) const
Returns sky map pixel for a given sky direction.
void init_statistics(void)
Initialise computation statistics.
Sky model class interface definition.
#define G_COMPUTE_TOF_CORRECTION
GGti validity(void) const
Return validity intervals of pulsar ephemerides.
virtual void clear(void)
Clear COMPTEL Data Space.
GFitsBinTable m_drw_table
DRW binary table to append to the FITS file.
const int & tjd(void) const
Return Truncated Julian Days of Orbit Aspect Record.
void read(const GFitsImage &image)
Read COMPTEL Data Space from DRI FITS image.
void init_members(void)
Initialise class members.
GGti m_gti
Good Time Intervals of data cube.
Interface class for COMPTEL observations.
int size(void) const
Return number of HDUs in FITS file.
GChatter reduce(const GChatter &chatter)
Reduce chattiness by one level.
int npsi(void) const
Return number of Psi bins.
virtual void clear(void)
Clear COMPTEL selection set.
void load(const GFilename &filename)
Load COMPTEL Data Space from DRI FITS file.
GEbounds m_ebounds
Energy boundaries of data cube.
GVector sin(const GVector &vector)
Computes sine of vector elements.
virtual GEvents * events(void)
Return events.
const int & tof_max(void) const
Return maximum of ToF selection window.
const GPhases & orbital_phases(void) const
Return orbital phases.
void compute_dre(const GCOMObservation &obs, const GCOMSelection &select=GCOMSelection(), const double &zetamin=5.0)
Compute event cube.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
COMPTEL event list class.
const int & nx(void) const
Returns number of pixels in x coordinate.
COMPTEL Data Space class.
int m_num_used_superpackets
Number of used superpackets.
GVector exp(const GVector &vector)
Computes exponential of vector elements.
double m_zetamin
Minimum zeta angle.
bool use_superpacket(const GCOMOad &oad, const GCOMTim &tim, const GCOMSelection &select)
Check if superpacket should be used.
const GEnergy & emax(void) const
Return maximum energy of all intervals.
void read(const GFitsHDU &hdu)
Read selection set from FITS HDU keywords.
COMPTEL Good Time Intervals class.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
const int & npix(void) const
Returns number of pixels.
const double & phibin(void) const
Return Compton scatter angle bin of DRI cube.
void read_attributes(const GFitsHDU *hdu)
Read DRI attributes from FITS HDU.
GFitsHeaderCard & card(const int &cardno)
Return header card.
void reduce(const GGti >i)
Reduces Good Time Intervals to intersection with intervals.
void close(void)
Close FITS file.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL Data Space.
double m_drw_e_fprompt
DRW fprompt parameter error.
std::string utc(const int &precision=0) const
Return time as string in UTC time system.
double m_phimin
Phibar minimum (deg)
void reduce(const GTime &tstart, const GTime &tstop)
Reduce Good Time Intervals to specified interval.
Abstract world coordinate system base class definition.
double theta(const GSkyDir &sky) const
Return zenith angle of sky direction in COMPTEL coordinates.
COMPTEL Orbit Aspect Data container class definition.
COMPTEL Orbit Aspect Data class definition.
Mathematical function definitions.
const float & gcaz(void) const
Return Geocentre azimuth angle.
Class that handles energies in a unit independent way.
COMPTEL event atom class.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
double phase(void) const
Returns pulse phase.
std::string m_name
Data cube name.