GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCOMObservation.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCOMObservation.hpp - COMPTEL observation class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2012-2023 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GCOMObservation.hpp
23  * @brief COMPTEL observation class interface definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GCOMOBSERVATION_HPP
28 #define GCOMOBSERVATION_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GObservation.hpp"
33 #include "GTime.hpp"
34 #include "GFilename.hpp"
35 #include "GCOMResponse.hpp"
36 #include "GCOMTim.hpp"
37 #include "GCOMOads.hpp"
38 #include "GCOMHkds.hpp"
39 #include "GCOMBvcs.hpp"
40 #include "GCOMDri.hpp"
41 #include "GCOMEventList.hpp"
42 #include "GCOMEventCube.hpp"
43 
44 /* __ Forward declarations _______________________________________________ */
45 class GCaldb;
46 class GResponse;
47 class GModelSky;
48 class GModels;
49 class GXmlElement;
50 class GFitsHDU;
51 class GSkyMap;
52 class GCOMStatus;
53 
54 
55 /***********************************************************************//**
56  * @class GCOMObservation
57  *
58  * @brief Interface class for COMPTEL observations
59  *
60  * This class implements a COMPTEL observation. Each COMPTEL observation is
61  * defined for a given energy range, and is composed of a DRE, DRB, DRG and
62  * DRX file. The DRE file contains the event data, the DRB file contains a
63  * background model, the DRG file contains geometry factors, and the DRX file
64  * contains the exposure.
65  ***************************************************************************/
66 class GCOMObservation : public GObservation {
67 
68 public:
69  // Constructors and destructors
70  GCOMObservation(void);
71  explicit GCOMObservation(const GXmlElement& xml);
72  GCOMObservation(const GCOMDri& dre,
73  const GCOMDri& drb,
74  const GCOMDri& drg,
75  const GCOMDri& drx);
76  GCOMObservation(const GCOMDri& dre,
77  const GCOMDri& drb,
78  const GCOMDri& drw,
79  const GCOMDri& drg,
80  const GCOMDri& drx);
82  const GFilename& drbname,
83  const GFilename& drwname,
84  const GFilename& drgname,
85  const GFilename& drxname);
86  GCOMObservation(const GFilename& evpname,
87  const GFilename& timname,
88  const std::vector<GFilename>& oadnames,
89  const std::vector<GFilename>& hkdnames = std::vector<GFilename> (),
90  const GFilename& bvcname = "");
91  GCOMObservation(const GCOMObservation& obs);
92  virtual ~GCOMObservation(void);
93 
94  // Operators
95  virtual GCOMObservation& operator=(const GCOMObservation& obs);
96 
97  // Implement pure virtual methods
98  virtual void clear(void);
99  virtual GCOMObservation* clone(void) const;
100  virtual std::string classname(void) const;
101  virtual void response(const GResponse& rsp);
102  virtual const GCOMResponse* response(void) const;
103  virtual std::string instrument(void) const;
104  virtual double ontime(void) const;
105  virtual double livetime(void) const;
106  virtual double deadc(const GTime& time = GTime()) const;
107  virtual void read(const GXmlElement& xml);
108  virtual void write(GXmlElement& xml) const;
109  virtual std::string print(const GChatter& chatter = NORMAL) const;
110 
111  // Reimplemented virtual methods
112  virtual double npred(const GModel& model) const;
113 
114  // Other methods
115  bool is_unbinned(void) const;
116  bool is_binned(void) const;
117  void load(const GFilename& drename,
118  const GFilename& drbname,
119  const GFilename& drwname,
120  const GFilename& drgname,
121  const GFilename& drxname);
122  void load(const GFilename& evpname,
123  const GFilename& timname,
124  const std::vector<GFilename>& oadnames,
125  const std::vector<GFilename>& hkdnames = std::vector<GFilename> (),
126  const GFilename& bvcname = "");
127  void response(const GCaldb& caldb, const std::string& rspname);
128  void response(const GCOMResponse& response);
129  void obs_id(const double& id);
130  void ontime(const double& ontime);
131  void livetime(const double& livetime);
132  void deadc(const double& deadc);
133  void ewidth(const double& ewidth);
134  const double& obs_id(void) const;
135  const double& ewidth(void) const;
136  const GCOMDri& drb(void) const;
137  const GCOMDri& drw(void) const;
138  const GCOMDri& drg(void) const;
139  const GCOMDri& drx(void) const;
140  GCOMDri drm(const GModels& models) const;
141  const GCOMTim& tim(void) const;
142  void tim(const GCOMTim& tim);
143  const GCOMOads& oads(void) const;
144  void oads(const GCOMOads& oads);
145  const GCOMHkds& hkds(void) const;
146  void hkds(const GCOMHkds& hkds);
147  const GCOMBvcs& bvcs(void) const;
148  void bvcs(const GCOMBvcs& bvcs);
149  const GFilename& drename(void) const;
150  const GFilename& drbname(void) const;
151  const GFilename& drwname(void) const;
152  const GFilename& drgname(void) const;
153  const GFilename& drxname(void) const;
154  const GFilename& rspname(void) const;
155  const int& phi_first(void) const;
156  const int& phi_last(void) const;
157  void drename(const GFilename& drename);
158  void drbname(const GFilename& drbname);
159  void drwname(const GFilename& drwname);
160  void drgname(const GFilename& drgname);
161  void drxname(const GFilename& drxname);
162  void rspname(const GFilename& rspname);
163  void phi_first(const int& phi_first);
164  void phi_last(const int& phi_last);
165  void compute_drb(const std::string& method,
166  const GCOMDri& drm,
167  const int& nrunav = 3,
168  const int& navgr = 3,
169  const int& nincl = 15,
170  const int& nexcl = 0);
171 
172 protected:
173  // Protected methods
174  void init_members(void);
175  void copy_members(const GCOMObservation& obs);
176  void free_members(void);
177  void load_dre(const GFilename& drename);
178  void load_drb(const GFilename& drbname);
179  void load_drw(const GFilename& drwname);
180  void load_drg(const GFilename& drgname);
181  void load_drx(const GFilename& drxname);
182  bool check_dri(const GCOMDri& map) const;
183  void read_attributes(const GFitsHDU* hdu);
184  void write_attributes(GFitsHDU* hdu) const;
185  void compute_drb_phinor(const GCOMDri& drm);
186  void compute_drb_bgdlixa(const GCOMDri& drm,
187  const int& nrunav = 3,
188  const int& navgr = 3,
189  const int& nincl = 15,
190  const int& nexcl = 0);
191  void compute_drb_bgdlixe(const GCOMDri& drm,
192  const int& nrunav = 3,
193  const int& navgr = 3,
194  const int& nincl = 15,
195  const int& nexcl = 0);
196  void compute_drb_bgdlixf(const GCOMDri& drm,
197  const int& nrunav = 3,
198  const int& navgr = 3,
199  const int& nincl = 15,
200  const int& nexcl = 0);
201  GSkyMap get_weighted_drg_map(void) const;
202  void get_bgdlixa_phibar_indices(const int& iphibar,
203  const int& nincl,
204  const int& nexcl,
205  int* isel1,
206  int* iex1,
207  int* iex2,
208  int* isel2) const;
209 
210  // Overwritten virtual methods
211  virtual bool use_event_for_likelihood(const int& index) const;
212 
213  // Protected members
214  std::string m_instrument; //!< Instrument name
215  GCOMResponse m_response; //!< Response functions
216  double m_obs_id; //!< Observation ID
217  double m_ontime; //!< Ontime (sec)
218  double m_livetime; //!< Livetime (sec)
219  double m_deadc; //!< Deadtime correction
220 
221  // Protected members for binned observation
222  GFilename m_drename; //!< DRE filename
223  GFilename m_drbname; //!< DRB filename
224  GFilename m_drwname; //!< DRW filename
225  GFilename m_drgname; //!< DRG filename
226  GFilename m_drxname; //!< DRX filename
227  GFilename m_rspname; //!< Response cache filename
228  GCOMDri m_drb; //!< Background model
229  GCOMDri m_drw; //!< Weighting cube
230  GCOMDri m_drg; //!< Geometry factors
231  GCOMDri m_drx; //!< Exposure map
232  double m_ewidth; //!< Energy width (MeV)
233  int m_phi_first; //!< First Phibar layer to use for likelihood
234  int m_phi_last; //!< Last Phibar layer to use for likelihood
235 
236  // Protected members for unbinned observation
237  GFilename m_evpname; //!< EVP filename
238  GFilename m_timname; //!< TIM filename
239  std::vector<GFilename> m_oadnames; //!< OAD filenames
240  std::vector<GFilename> m_hkdnames; //!< HKD filenames
241  GFilename m_bvcname; //!< BVC filename
242  GCOMTim m_tim; //!< COMPTEL Good Time Intervals
243  GCOMOads m_oads; //!< Orbit Aspect Data
244  GCOMHkds m_hkds; //!< Housekeeping Data
245  GCOMBvcs m_bvcs; //!< Solar System Barycentre Data
246 };
247 
248 
249 /***********************************************************************//**
250  * @brief Return class name
251  *
252  * @return String containing the class name ("GCOMObservation").
253  ***************************************************************************/
254 inline
255 std::string GCOMObservation::classname(void) const
256 {
257  return ("GCOMObservation");
258 }
259 
260 
261 /***********************************************************************//**
262  * @brief Return response function
263  *
264  * @return Response function.
265  ***************************************************************************/
266 inline
268 {
269  // Return response pointer
270  return &m_response;
271 }
272 
273 
274 /***********************************************************************//**
275  * @brief Set response function
276  *
277  * @param[in] response Response function.
278  ***************************************************************************/
279 inline
281 {
283  return;
284 }
285 
286 
287 /***********************************************************************//**
288  * @brief Return instrument
289  *
290  * @return Instrument name.
291  ***************************************************************************/
292 inline
293 std::string GCOMObservation::instrument(void) const
294 {
295  // Return instrument
296  return (m_instrument);
297 }
298 
299 
300 /***********************************************************************//**
301  * @brief Return ontime
302  *
303  * @return Ontime (seconds).
304  ***************************************************************************/
305 inline
306 double GCOMObservation::ontime(void) const
307 {
308  // Return ontime
309  return (m_ontime);
310 }
311 
312 
313 /***********************************************************************//**
314  * @brief Return livetime
315  *
316  * @return Livetime (seconds).
317  ***************************************************************************/
318 inline
319 double GCOMObservation::livetime(void) const
320 {
321  // Return livetime
322  return (m_livetime);
323 }
324 
325 
326 /***********************************************************************//**
327  * @brief Return deadtime correction factor
328  *
329  * @param[in] time Time.
330  *
331  * @return Deadtime correction factor.
332  ***************************************************************************/
333 inline
334 double GCOMObservation::deadc(const GTime& time) const
335 {
336  // Return livetime
337  return (m_deadc);
338 }
339 
340 
341 /***********************************************************************//**
342  * @brief Set observation ID
343  *
344  * @param[in] id Observation ID.
345  ***************************************************************************/
346 inline
347 void GCOMObservation::obs_id(const double& id)
348 {
349  m_obs_id = id;
350  return;
351 }
352 
353 
354 /***********************************************************************//**
355  * @brief Set ontime
356  *
357  * @param[in] ontime Ontime.
358  ***************************************************************************/
359 inline
360 void GCOMObservation::ontime(const double& ontime)
361 {
362  m_ontime = ontime;
363  return;
364 }
365 
366 
367 /***********************************************************************//**
368  * @brief Set livetime
369  *
370  * @param[in] livetime Livetime.
371  ***************************************************************************/
372 inline
373 void GCOMObservation::livetime(const double& livetime)
374 {
376  return;
377 }
378 
379 
380 /***********************************************************************//**
381  * @brief Set deadtime correction factor
382  *
383  * @param[in] deadc Deadtime correction factor.
384  ***************************************************************************/
385 inline
386 void GCOMObservation::deadc(const double& deadc)
387 {
388  m_deadc = deadc;
389  return;
390 }
391 
392 
393 /***********************************************************************//**
394  * @brief Set energy width
395  *
396  * @param[in] ewidth Energy width (MeV).
397  ***************************************************************************/
398 inline
399 void GCOMObservation::ewidth(const double& ewidth)
400 {
401  m_ewidth = ewidth;
402  return;
403 }
404 
405 
406 /***********************************************************************//**
407  * @brief Return observation ID
408  *
409  * @return Observation ID.
410  ***************************************************************************/
411 inline
412 const double& GCOMObservation::obs_id(void) const
413 {
414  // Return observation ID
415  return (m_obs_id);
416 }
417 
418 
419 /***********************************************************************//**
420  * @brief Return energy width
421  *
422  * @return Energy width (MeV).
423  ***************************************************************************/
424 inline
425 const double& GCOMObservation::ewidth(void) const
426 {
427  // Return energy width
428  return (m_ewidth);
429 }
430 
431 
432 /***********************************************************************//**
433  * @brief Return background model
434  *
435  * @return Background model.
436  ***************************************************************************/
437 inline
438 const GCOMDri& GCOMObservation::drb(void) const
439 {
440  // Return background model
441  return (m_drb);
442 }
443 
444 
445 /***********************************************************************//**
446  * @brief Return weighting cube
447  *
448  * @return Weighting cube.
449  ***************************************************************************/
450 inline
451 const GCOMDri& GCOMObservation::drw(void) const
452 {
453  // Return weighting cube
454  return (m_drw);
455 }
456 
457 
458 /***********************************************************************//**
459  * @brief Return geometry factors
460  *
461  * @return Geometry factors.
462  ***************************************************************************/
463 inline
464 const GCOMDri& GCOMObservation::drg(void) const
465 {
466  // Return geometry factors
467  return (m_drg);
468 }
469 
470 
471 /***********************************************************************//**
472  * @brief Return exposure
473  *
474  * @return Exposure.
475  ***************************************************************************/
476 inline
477 const GCOMDri& GCOMObservation::drx(void) const
478 {
479  // Return exposure
480  return (m_drx);
481 }
482 
483 
484 /***********************************************************************//**
485  * @brief Return COMPTEL Good Time Intervals
486  *
487  * @return COMPTEL Good Time Intervals.
488  ***************************************************************************/
489 inline
490 const GCOMTim& GCOMObservation::tim(void) const
491 {
492  // Return COMPTEL Good Time Intervals
493  return (m_tim);
494 }
495 
496 
497 /***********************************************************************//**
498  * @brief Set COMPTEL Good Time Intervals
499  *
500  * @param[in] tim COMPTEL Good Time Intervals.
501  ***************************************************************************/
502 inline
504 {
505  m_tim = tim;
506  return;
507 }
508 
509 
510 /***********************************************************************//**
511  * @brief Return Orbit Aspect Data
512  *
513  * @return Orbit Aspect Data
514  ***************************************************************************/
515 inline
516 const GCOMOads& GCOMObservation::oads(void) const
517 {
518  // Return Orbit Aspect Data
519  return (m_oads);
520 }
521 
522 
523 /***********************************************************************//**
524  * @brief Set Orbit Aspect Data
525  *
526  * @param[in] oads Orbit Aspect Data.
527  ***************************************************************************/
528 inline
530 {
531  m_oads = oads;
532  return;
533 }
534 
535 
536 /***********************************************************************//**
537  * @brief Return Housekeeping Data collection
538  *
539  * @return Housekeeping Data collection
540  ***************************************************************************/
541 inline
542 const GCOMHkds& GCOMObservation::hkds(void) const
543 {
544  // Return Housekeeping Data collection
545  return (m_hkds);
546 }
547 
548 
549 /***********************************************************************//**
550  * @brief Set Housekeeping Data collection
551  *
552  * @param[in] hkds Housekeeping Data collection.
553  ***************************************************************************/
554 inline
556 {
557  m_hkds = hkds;
558  return;
559 }
560 
561 
562 /***********************************************************************//**
563  * @brief Return Solar System Barycentre Data
564  *
565  * @return Solar System Barycentre Data
566  ***************************************************************************/
567 inline
568 const GCOMBvcs& GCOMObservation::bvcs(void) const
569 {
570  // Return Solar System Barycentre Data
571  return (m_bvcs);
572 }
573 
574 
575 /***********************************************************************//**
576  * @brief Set Solar System Barycentre Data
577  *
578  * @param[in] bvcs Solar System Barycentre Data.
579  ***************************************************************************/
580 inline
582 {
583  m_bvcs = bvcs;
584  return;
585 }
586 
587 
588 /***********************************************************************//**
589  * @brief Check whether observation is unbinned
590  *
591  * @return True if observation is unbinned.
592  ***************************************************************************/
593 inline
595 {
596  return (dynamic_cast<const GCOMEventList*>(m_events) != NULL);
597 }
598 
599 
600 /***********************************************************************//**
601  * @brief Check whether observation is binned
602  *
603  * @return True if observation is unbinned.
604  ***************************************************************************/
605 inline
607 {
608  return (dynamic_cast<const GCOMEventCube*>(m_events) != NULL);
609 }
610 
611 
612 /***********************************************************************//**
613  * @brief Return DRE filename
614  *
615  * @return DRE filename.
616  ***************************************************************************/
617 inline
619 {
620  // Return DRE filename
621  return (m_drename);
622 }
623 
624 
625 /***********************************************************************//**
626  * @brief Return DRB filename
627  *
628  * @return DRB filename.
629  ***************************************************************************/
630 inline
632 {
633  // Return DRB filename
634  return (m_drbname);
635 }
636 
637 
638 /***********************************************************************//**
639  * @brief Return DRW filename
640  *
641  * @return DRW filename.
642  ***************************************************************************/
643 inline
645 {
646  // Return DRW filename
647  return (m_drwname);
648 }
649 
650 
651 /***********************************************************************//**
652  * @brief Return DRG filename
653  *
654  * @return DRG filename.
655  ***************************************************************************/
656 inline
658 {
659  // Return DRG filename
660  return (m_drgname);
661 }
662 
663 
664 /***********************************************************************//**
665  * @brief Return DRX filename
666  *
667  * @return DRX filename.
668  ***************************************************************************/
669 inline
671 {
672  // Return DRX filename
673  return (m_drxname);
674 }
675 
676 
677 /***********************************************************************//**
678  * @brief Return response cache filename
679  *
680  * @return Response cache filename.
681  ***************************************************************************/
682 inline
684 {
685  // Return response cache filename
686  return (m_rspname);
687 }
688 
689 
690 /***********************************************************************//**
691  * @brief Return index of first Phibar layer to be used for likelihood fitting
692  *
693  * @return Index of first Phibar layer.
694  ***************************************************************************/
695 inline
696 const int& GCOMObservation::phi_first(void) const
697 {
698  // Return index of first Phibar layer
699  return (m_phi_first);
700 }
701 
702 
703 /***********************************************************************//**
704  * @brief Return index of last Phibar layer to be used for likelihood fitting
705  *
706  * @return Index of last Phibar layer.
707  ***************************************************************************/
708 inline
709 const int& GCOMObservation::phi_last(void) const
710 {
711  // Return index of last Phibar layer
712  return (m_phi_last);
713 }
714 
715 
716 /***********************************************************************//**
717  * @brief Set DRE filename
718  *
719  * @param[in] drename DRE filename.
720  ***************************************************************************/
721 inline
723 {
724  m_drename = drename;
725  return;
726 }
727 
728 
729 /***********************************************************************//**
730  * @brief Set DRB filename
731  *
732  * @param[in] drbname DRB filename.
733  ***************************************************************************/
734 inline
736 {
737  m_drbname = drbname;
738  return;
739 }
740 
741 
742 /***********************************************************************//**
743  * @brief Set DRW filename
744  *
745  * @param[in] drwname DRW filename.
746  ***************************************************************************/
747 inline
749 {
750  m_drwname = drwname;
751  return;
752 }
753 
754 
755 /***********************************************************************//**
756  * @brief Set DRG filename
757  *
758  * @param[in] drgname DRG filename.
759  ***************************************************************************/
760 inline
762 {
763  m_drgname = drgname;
764  return;
765 }
766 
767 
768 /***********************************************************************//**
769  * @brief Set DRX filename
770  *
771  * @param[in] drxname DRX filename.
772  ***************************************************************************/
773 inline
775 {
776  m_drxname = drxname;
777  return;
778 }
779 
780 
781 /***********************************************************************//**
782  * @brief Set response cache filename filename
783  *
784  * @param[in] cachename Response cache filename.
785  ***************************************************************************/
786 inline
788 {
789  m_rspname = rspname;
790  return;
791 }
792 
793 
794 /***********************************************************************//**
795  * @brief Set index of first Phibar layer to be used for likelihood fitting
796  *
797  * @param[in] phi_first Index of first Phibar layer.
798  ***************************************************************************/
799 inline
800 void GCOMObservation::phi_first(const int& phi_first)
801 {
803  return;
804 }
805 
806 
807 /***********************************************************************//**
808  * @brief Set index of last Phibar layer to be used for likelihood fitting
809  *
810  * @param[in] phi_last Index of last Phibar layer.
811  ***************************************************************************/
812 inline
813 void GCOMObservation::phi_last(const int& phi_last)
814 {
816  return;
817 }
818 
819 #endif /* GCOMOBSERVATION_HPP */
COMPTEL instrument status class.
Definition: GCOMStatus.hpp:49
virtual void clear(void)
Clear COMPTEL observation.
Abstract model class.
Definition: GModel.hpp:100
Sky map class.
Definition: GSkyMap.hpp:89
void load(const GFilename &drename, const GFilename &drbname, const GFilename &drwname, const GFilename &drgname, const GFilename &drxname)
Load data for a binned observation.
const GCOMOads & oads(void) const
Return Orbit Aspect Data.
void get_bgdlixa_phibar_indices(const int &iphibar, const int &nincl, const int &nexcl, int *isel1, int *iex1, int *iex2, int *isel2) const
Compute Phibar index range for BGDLIXA background method.
double m_obs_id
Observation ID.
GFilename m_bvcname
BVC filename.
void compute_drb(const std::string &method, const GCOMDri &drm, const int &nrunav=3, const int &navgr=3, const int &nincl=15, const int &nexcl=0)
Compute DRB cube.
void copy_members(const GCOMObservation &obs)
Copy class members.
const GCOMHkds & hkds(void) const
Return Housekeeping Data collection.
const GCOMBvcs & bvcs(void) const
Return Solar System Barycentre Data.
GFilename m_drbname
DRB filename.
void init_members(void)
Initialise class members.
Abstract FITS extension base class.
Definition: GFitsHDU.hpp:51
double m_deadc
Deadtime correction.
COMPTEL Data Space class definition.
COMPTEL event list class definition.
GFilename m_timname
TIM filename.
const GCOMDri & drx(void) const
Return exposure.
std::vector< GFilename > m_oadnames
OAD filenames.
GEvents * m_events
Pointer to event container.
const GFilename & drxname(void) const
Return DRX filename.
COMPTEL Solar System Barycentre Data container class definition.
const GFilename & drbname(void) const
Return DRB filename.
std::vector< GFilename > m_hkdnames
HKD filenames.
virtual double ontime(void) const
Return ontime.
const GCOMDri & drw(void) const
Return weighting cube.
GFilename m_evpname
EVP filename.
XML element node class.
Definition: GXmlElement.hpp:48
GCOMDri m_drx
Exposure map.
bool is_unbinned(void) const
Check whether observation is unbinned.
const GCOMDri & drb(void) const
Return background model.
GCOMDri m_drg
Geometry factors.
Interface for the COMPTEL instrument response function.
Time class.
Definition: GTime.hpp:55
void load_drw(const GFilename &drwname)
Load weighting cube from DRW file.
void load_dre(const GFilename &drename)
Load event cube data from DRE file.
void free_members(void)
Delete class members.
const int & phi_first(void) const
Return index of first Phibar layer to be used for likelihood fitting.
virtual double npred(const GModel &model) const
Return total number of predicted counts for one model.
COMPTEL Good Time Intervals class definition.
GCOMTim m_tim
COMPTEL Good Time Intervals.
virtual double deadc(const GTime &time=GTime()) const
Return deadtime correction factor.
const GFilename & drgname(void) const
Return DRG filename.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print observation information.
void compute_drb_bgdlixf(const GCOMDri &drm, const int &nrunav=3, const int &navgr=3, const int &nincl=15, const int &nexcl=0)
Compute DRB cube using BGDLIXF method.
const double & obs_id(void) const
Return observation ID.
const GFilename & rspname(void) const
Return response cache filename.
GCOMDri m_drb
Background model.
virtual const GCOMResponse * response(void) const
Return response function.
GCOMDri drm(const GModels &models) const
Compute DRM cube.
GFilename m_rspname
Response cache filename.
void compute_drb_bgdlixa(const GCOMDri &drm, const int &nrunav=3, const int &navgr=3, const int &nincl=15, const int &nexcl=0)
Compute DRB cube using BGDLIXA method.
const GCOMTim & tim(void) const
Return COMPTEL Good Time Intervals.
const GCOMDri & drg(void) const
Return geometry factors.
Model container class.
Definition: GModels.hpp:152
Calibration database class.
Definition: GCaldb.hpp:66
GCOMBvcs m_bvcs
Solar System Barycentre Data.
const std::string & id(void) const
Return observation identifier.
GFilename m_drwname
DRW filename.
COMPTEL instrument response function class interface definition.
void compute_drb_phinor(const GCOMDri &drm)
Compute DRB cube using PHINOR method.
const GFilename & drename(void) const
Return DRE filename.
virtual void write(GXmlElement &xml) const
Write observation into XML element.
virtual void read(const GXmlElement &xml)
Read observation from XML element.
Filename class.
Definition: GFilename.hpp:62
virtual double model(const GModels &models, const GEvent &event, GVector *gradients=NULL) const
Return model value and (optionally) gradients.
COMPTEL Housekeeping Data collection class.
Definition: GCOMHkds.hpp:51
void load_drb(const GFilename &drbname)
Load background model from DRB file.
double m_ontime
Ontime (sec)
bool is_binned(void) const
Check whether observation is binned.
void read_attributes(const GFitsHDU *hdu)
Read observation attributes.
virtual std::string instrument(void) const
Return instrument.
GChatter
Definition: GTypemaps.hpp:33
const GFilename & drwname(void) const
Return DRW filename.
double m_livetime
Livetime (sec)
Abstract observation base class.
virtual GCOMObservation * clone(void) const
Clone COMPTEL observation.
void compute_drb_bgdlixe(const GCOMDri &drm, const int &nrunav=3, const int &navgr=3, const int &nincl=15, const int &nexcl=0)
Compute DRB cube using BGDLIXE method.
virtual std::string classname(void) const
Return class name.
Abstract observation base class interface definition.
double m_ewidth
Energy width (MeV)
Sky model class.
Definition: GModelSky.hpp:122
GCOMOads m_oads
Orbit Aspect Data.
void load_drx(const GFilename &drxname)
Load exposure from DRX file.
Interface class for COMPTEL observations.
GSkyMap get_weighted_drg_map(void) const
Return weighted DRG map.
virtual bool use_event_for_likelihood(const int &index) const
Check whether bin should be used for likelihood analysis.
COMPTEL Data Space class.
Definition: GCOMDri.hpp:62
virtual double livetime(void) const
Return livetime.
COMPTEL Orbit Aspect Data container class.
Definition: GCOMOads.hpp:51
GCOMHkds m_hkds
Housekeeping Data.
const double & ewidth(void) const
Return energy width.
COMPTEL Housekeeping Data collection class definition.
int m_phi_last
Last Phibar layer to use for likelihood.
void write_attributes(GFitsHDU *hdu) const
Write observation attributes.
COMPTEL Good Time Intervals class.
Definition: GCOMTim.hpp:50
Abstract instrument response base class.
Definition: GResponse.hpp:77
COMPTEL event bin container class interface definition.
virtual GCOMObservation & operator=(const GCOMObservation &obs)
Assignment operator.
COMPTEL Solar System Barycentre Data container class.
Definition: GCOMBvcs.hpp:54
GCOMDri m_drw
Weighting cube.
bool check_dri(const GCOMDri &map) const
Check if DRI is compatible with event cube.
GCOMObservation(void)
Void constructor.
int m_phi_first
First Phibar layer to use for likelihood.
const int & phi_last(void) const
Return index of last Phibar layer to be used for likelihood fitting.
Time class interface definition.
GFilename m_drxname
DRX filename.
virtual ~GCOMObservation(void)
Destructor.
void load_drg(const GFilename &drgname)
Load geometry factors from DRG file.
GCOMResponse m_response
Response functions.
Filename class interface definition.
GFilename m_drgname
DRG filename.
COMPTEL Orbit Aspect Data container class definition.
std::string m_instrument
Instrument name.
GFilename m_drename
DRE filename.