54 #define G_COMPUTE_DRE "GCOMDri::compute_dre(GCOMObservation&, "\
55 "GCOMSelection&, double&)"
56 #define G_COMPUTE_DRX "GCOMDri::compute_drx(GCOMObservation&, "\
57 "GCOMSelection&, double&)"
58 #define G_COMPUTE_DRM "GCOMDri::compute_drm(GCOMObservation&, GModel&)"
59 #define G_COMPUTE_TOF_CORRECTION "GCOMDri::compute_tof_correction()"
73 const double r1 = 13.8;
128 const double& phimin,
129 const double& phibin,
268 const double& zetamin)
271 #if defined(G_DEBUG_COMPUTE_DRE)
272 std::cout <<
"GCOMDri::compute_dre" << std::endl;
273 std::cout <<
"====================" << std::endl;
278 if (events == NULL) {
279 std::string msg =
"No event list found in COMPTEL observation. Please "
280 "specify an observation that contains an event list.";
286 std::string msg =
"DRE cube has a non-positive Phibar bin size. Please "
287 "specify a DRE cube with a positive Phibar bin size.";
312 int num_used_events = 0;
313 int num_event_outside_sp = 0;
314 int num_energy_too_low = 0;
315 int num_energy_too_high = 0;
316 int num_eha_too_small = 0;
317 int num_phibar_too_low = 0;
318 int num_phibar_too_high = 0;
319 int num_outside_dre = 0;
320 int num_event_before_dre = 0;
321 int num_event_after_dre = 0;
322 int num_processed = 0;
328 bool terminate =
false;
345 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
357 double theta_geocentre = double(oad.
gcel());
358 double phi_geocentre = double(oad.
gcaz());
359 sky_geocentre.
radec_deg(phi_geocentre, 90.0-theta_geocentre);
363 for (; i_evt < events->
size(); ++i_evt) {
369 if (event->time() > oad.
tstop()) {
381 num_event_before_dre++;
387 num_event_after_dre++;
395 if (event->time() < oad.
tstart()) {
396 num_event_outside_sp++;
402 num_energy_too_low++;
406 num_energy_too_high++;
418 num_phibar_too_low++;
421 else if (iphibar >=
nphibar()) {
422 num_phibar_too_high++;
427 #if defined(G_CHECK_EHA_COMPUTATION)
429 double theta_event = double(event->theta());
430 double phi_event = double(event->phi());
431 sky_event.
radec_deg(-phi_event, 90.0-theta_event);
433 if (
std::abs(eha - event->eha()) > 1.5) {
434 std::string msg =
"Earth horizon angle from EVP dataset ("+
436 "differs from Earth horizon angle "
437 "computed from Orbit Aspect Data ("+
446 double ehamin = double(iphibar) *
m_phibin + zetamin;
447 if (event->eha() < ehamin) {
471 tdelta = ephem.
geo2ssb(ephemeris.
dir(),
event->time(), oad.
pos()) +
472 event->time().utc2tt();
477 GTime time =
event->time() + tdelta;
481 double phase = ephemeris.
phase(time,
"UTC");
510 if (terminate || i_evt >= events->
size()) {
522 #if defined(G_DEBUG_COMPUTE_DRE)
526 std::cout <<
"Total number of events .......: " << events.
size() << std::endl;
527 std::cout <<
"Processed events .............: " << num_processed << std::endl;
528 std::cout <<
"Used events ..................: " << num_used_events << std::endl;
529 std::cout <<
"Events outside superpacket ...: " << num_event_outside_sp << std::endl;
530 std::cout <<
"Events before DRE GTI ........: " << num_event_before_dre << std::endl;
531 std::cout <<
"Events after DRE GTI .........: " << num_event_after_dre << std::endl;
532 std::cout <<
"Energy too low ...............: " << num_energy_too_low << std::endl;
533 std::cout <<
"Energy too high ..............: " << num_energy_too_high << std::endl;
534 std::cout <<
"Phibar too low ...............: " << num_phibar_too_low << std::endl;
535 std::cout <<
"Phibar too high ..............: " << num_phibar_too_high << std::endl;
536 std::cout <<
"Outside DRE cube .............: " << num_outside_dre << std::endl;
537 std::cout <<
"Earth horizon angle too small : " << num_eha_too_small << std::endl;
560 const double& zetamin)
563 #if defined(G_DEBUG_COMPUTE_DRG)
564 std::cout <<
"GCOMDri::compute_drg" << std::endl;
565 std::cout <<
"====================" << std::endl;
590 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
606 double theta_geocentre = double(oad.
gcel());
607 double phi_geocentre = double(oad.
gcaz());
609 geocentre_comptel.
radec_deg(phi_geocentre, 90.0-theta_geocentre);
612 for (
int index = 0; index <
m_dri.
npix(); ++index) {
618 double theta = oad.
theta(sky);
619 double phi = oad.
phi(sky);
628 chipsi_comptel.
radec_deg(phi, 90.0-theta);
629 double eha = geocentre_comptel.dist_deg(chipsi_comptel) - oad.
georad();
632 for (
int iphibar = 0; iphibar <
nphibar(); ++iphibar) {
635 double ehamin = double(iphibar) *
m_phibin + zetamin;
640 int inx = index + iphibar *
m_dri.
npix();
641 (*this)[inx] += geometry;
653 for (
int i = 0; i <
size(); ++i) {
667 #if defined(G_DEBUG_COMPUTE_DRG)
707 #if defined(G_DEBUG_COMPUTE_DRX)
708 std::cout <<
"GCOMDri::compute_drx" << std::endl;
709 std::cout <<
"====================" << std::endl;
713 const double tau = 0.2;
730 for (
int i_oad = 0; i_oad < obs.
oads().
size(); ++i_oad) {
741 for (
int index = 0; index <
m_dri.
npix(); ++index) {
747 double theta = oad.
theta(sky);
750 double exposure = 0.0;
761 exposure =
d1_area * costheta *
771 (*this)[index] += exposure;
778 for (
int i = 0; i <
size(); ++i) {
791 #if defined(G_DEBUG_COMPUTE_DRX)
820 for (
int iphibar = 0, i = 0; iphibar <
nphibar(); ++iphibar) {
821 for (
int ipix = 0; ipix < npix; ++ipix, ++i) {
822 m_dri(ipix, iphibar) = values[i];
847 const double& armmin,
848 const double& armmax)
const
851 double content = 0.0;
855 for (
int i = 0; i < phigeo.
npix(); ++i) {
860 for (
int iphibar = 0; iphibar < this->
nphibar(); ++iphibar) {
863 double phibar = this->
phimin() + (iphibar+0.5) * this->
phibin();
866 int offset = iphibar * phigeo.
npix();
869 for (
int i = 0; i < phigeo.
npix(); ++i) {
872 double arm = phibar - phigeo(i);
875 if (arm >= armmin && arm < armmax) {
876 content += (*this)[i + offset];
896 GFits fits(filename);
927 fits.
saveto(filename, clobber);
1000 double psimin = 0.0;
1001 double psimax = 0.0;
1002 double psibin = 0.0;
1005 chibin = wcs->
cdelt(0);
1006 chimin = wcs->
crval(0) - (wcs->
crpix(0)-0.5) * chibin;
1007 chimax = chimin +
m_dri.
nx() * chibin;
1008 psibin = wcs->
cdelt(1);
1009 psimin = wcs->
crval(1) - (wcs->
crpix(1)-0.5) * psibin;
1010 psimax = psimin +
m_dri.
ny() * psibin;
1017 result.append(
"=== GCOMDri ===");
1157 for (
int i = 0; i <
size(); ++i) {
1273 if (tstop > tstart) {
1366 hdu->
card(
"CTYPE3",
"Phibar",
"Compton scatter angle");
1367 hdu->
card(
"CRPIX3", 1.0,
"Pixel coordinate of reference point (starting from 1)");
1368 hdu->
card(
"CRVAL3", crval3,
"[deg] Coordinate value at reference point");
1369 hdu->
card(
"CDELT3",
m_phibin,
"[deg] Coordinate increment at reference point");
1387 hdu->
card(
"VISDAY", visday,
"[TJD] Data validity interval start day");
1388 hdu->
card(
"VISTIM", vistim,
"[tics] Data validity interval start time");
1389 hdu->
card(
"VIEDAY", vieday,
"[TJD] Data validity interval end day");
1390 hdu->
card(
"VIETIM", vietim,
"[tics] Data validity interval end time");
1409 std::string d1use =
"0000000";
1410 for (
int i = 0; i < 7; ++i) {
1415 hdu->
card(
"D1USE", d1use,
"D1 module usage");
1418 std::string d2use =
"00000000000000";
1419 for (
int i = 0; i < 14; ++i) {
1424 hdu->
card(
"D2USE", d2use,
"D2 module usage");
1430 hdu->
card(
"EHAMIN",
m_zetamin,
"[deg] Minimum Earth horizon - Phibar cut");
1467 const double& theta,
1473 const double xd1[] = {0.0,-42.3,-26.0,26.0, 42.3,26.0,-26.0};
1474 const double yd1[] = {0.0, 0.0, 39.1,39.1, 0.0,-39.1,-39.1};
1477 const double xd2[] = { 30.2, 0.0, -30.2, 45.3, 15.1, -15.1, -45.3,
1478 45.3, 15.1, -15.1, -45.3, 30.2, 0.0, -30.2};
1479 const double yd2[] = {-41.254,-41.254,-41.254,-15.1, -15.1, -15.1, -15.1,
1480 15.1, 15.1, 15.1 , 15.1, 41.254,41.254,41.254};
1484 const double delz = 158.0;
1490 const double r2 = 14.085;
1494 const double r2sq = r2 * r2;
1495 const double drsq =
r1sq - r2sq;
1499 double geometry = 0.0;
1506 double tantheta =
std::tan(theta_rad);
1509 for (
int id1 = 0; id1 < 7; ++id1) {
1512 if (status.
d1status(tjd, id1+1) != 1) {
1517 double xd1_prj = xd1[id1] - delz * tantheta * cosphi;
1518 double yd1_prj = yd1[id1] - delz * tantheta * sinphi;
1521 for (
int id2 = 0; id2 < 14; ++id2) {
1529 int d2status = status.
d2status(tjd, id2+1);
1533 if ((d2status < 1) || ((d2status > 1) && (select.
fpmtflag() == 0))) {
1539 double dx = xd2[id2] - xd1_prj;
1540 double dy = yd2[id2] - yd1_prj;
1541 double dsq = dx * dx + dy * dy;
1553 double overlap = 0.0;
1554 if ((d2status > 1) && (select.
fpmtflag() == 2)) {
1558 xd2[id2], yd2[id2], r2,
1570 if (d <= r2 -
r1 + 0.1) {
1571 double gmt = (1.0 > overlap) ? 1.0 - overlap : 0.0;
1581 double d2 = 2.0 * d;
1582 double cbeta1 = (dsq + drsq) / (d2 *
r1);
1583 double cbeta2 = (dsq - drsq) / (d2 * r2);
1586 double sbeta1 =
std::sqrt(1.0 - cbeta1 * cbeta1);
1587 double sbeta2 =
std::sqrt(1.0 - cbeta2 * cbeta2);
1594 double gmt = (
r1sq * (beta1 - sbeta1 * cbeta1) +
1595 r2sq * (beta2 - sbeta2 * cbeta2)) * norm_geo -
1634 const double& x2,
const double& y2,
const double& r2)
const
1637 double surface = 0.0;
1640 double dx = x1 - x2;
1641 double dy = y1 - y2;
1642 double dsq = dx * dx + dy * dy;
1654 else if (r2 > (d+r1)) {
1660 else if (d < (r1+r2)) {
1663 double d2 = 2.0 * d;
1665 double r2sq = r2 * r2;
1666 double cbeta1 = (r1sq - r2sq + dsq) / (d2 * r1);
1667 double cbeta2 = (r2sq - r1sq + dsq) / (d2 * r2);
1670 double sbeta1 =
std::sqrt(1.0 - cbeta1 * cbeta1);
1671 double sbeta2 =
std::sqrt(1.0 - cbeta2 * cbeta2);
1678 surface = r1sq * (beta1 - sbeta1 * cbeta1) +
1679 r2sq * (beta2 - sbeta2 * cbeta2);
1708 const double& x2,
const double& y2,
const double& r2,
1709 const double& x3,
const double& y3,
const double& r3)
const
1712 const int steps = 25;
1713 const int size = steps*steps;
1714 static double o23_x[
size];
1715 static double o23_y[
size];
1716 static double last_x2 = 1.0e25;
1717 static double last_y2 = 1.0e25;
1718 static double last_x3 = 1.0e25;
1719 static double last_y3 = 1.0e25;
1720 static int no23 = 0;
1723 double overlap = 0.0;
1730 double dx12 = x1 - x2;
1731 double dy12 = y1 - y2;
1732 double d12 =
std::sqrt(dx12*dx12 + dy12*dy12);
1733 if (d12 > (r1+r2)) {
1739 double dx13 = x1 - x3;
1740 double dy13 = y1 - y3;
1741 double d13 =
std::sqrt(dx13*dx13 + dy13*dy13);
1742 if (d13 > (r1+r3)) {
1760 double step = 2.0 * r3 / double(steps-3);
1761 double stepsq = step * step;
1763 if ((last_x2 != x2) || (last_y2 != y2) || (last_x3 != x3) || (last_y3 != y3)) {
1773 double r2sq = r2 * r2;
1774 double r3sq = r3 * r3;
1776 double yy = y3 - r3 - step;
1777 for (
int i = 0; i < steps; ++i, yy += step) {
1778 double xx = x3 - r3 - step;
1779 for (
int j = 0; j < steps; ++j, xx += step) {
1780 double dx3 = xx - x3;
1781 double dy3 = yy - y3;
1782 if (dx3*dx3 + dy3*dy3 < r3sq) {
1783 double dx2 = xx - x2;
1784 double dy2 = yy - y2;
1785 if (dx2*dx2 + dy2*dy2 < r2sq) {
1798 for (
int i = 0; i < no23; ++i) {
1799 double dx1 = o23_x[i] - x1;
1800 double dy1 = o23_y[i] - y1;
1801 if (dx1*dx1 + dy1*dy1 < r1sq) {
1809 if (overlap > 0.0) {
1826 const double tofcoreng[] = {0.8660, 1.7321, 5.4772, 17.3205};
1827 const double tofcor110[] = {1.14, 1.07, 1.02, 1.01};
1828 const double tofcor111[] = {1.17, 1.09, 1.03, 1.01};
1829 const double tofcor112[] = {1.21, 1.11, 1.05, 1.02};
1830 const double tofcor113[] = {1.26, 1.15, 1.07, 1.04};
1831 const double tofcor114[] = {1.32, 1.20, 1.11, 1.06};
1832 const double tofcor115[] = {1.40, 1.27, 1.17, 1.11};
1833 const double tofcor116[] = {1.50, 1.36, 1.24, 1.17};
1834 const double tofcor117[] = {1.63, 1.47, 1.35, 1.28};
1835 const double tofcor118[] = {1.79, 1.63, 1.51, 1.43};
1836 const double tofcor119[] = {2.01, 1.85, 1.73, 1.67};
1837 const double* tofcor[] = {tofcor110, tofcor111, tofcor112,
1838 tofcor113, tofcor114, tofcor115,
1839 tofcor116, tofcor117, tofcor118,
1844 std::string msg =
"Minimum of ToF selection window "+
1846 " is smaller than 110. No ToF correction is "
1847 "available for this value.";
1851 std::string msg =
"Minimum of ToF selection window "+
1853 " is larger than 119. No ToF correction is "
1854 "available for this value.";
1858 std::string msg =
"Maximum of ToF selection window "+
1860 " is not 130. No ToF correction is available for "
1874 nodes.set_value(energy);
1880 m_tofcor = tofcor[i][nodes.inx_left()] * nodes.wgt_left() +
1881 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 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.
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.
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.
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 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.
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.
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.
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.
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.
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.