GammaLib 2.2.0.dev
Loading...
Searching...
No Matches
GCOMObservation.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCOMObservation.hpp - COMPTEL observation class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2012-2025 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 _______________________________________________ */
45class GCaldb;
46class GResponse;
47class GModelSky;
48class GModels;
49class GXmlElement;
50class GFitsHDU;
51class GSkyMap;
52class 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 ***************************************************************************/
67
68public:
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 = "");
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 // Overloaded virtual methods
112 virtual double npred(const GModel& model) const;
113 virtual double grad_step_size(const GModelPar& par) const;
114
115 // Other methods
116 bool is_unbinned(void) const;
117 bool is_binned(void) const;
118 void load(const GFilename& drename,
119 const GFilename& drbname,
120 const GFilename& drwname,
121 const GFilename& drgname,
122 const GFilename& drxname);
123 void load(const GFilename& evpname,
124 const GFilename& timname,
125 const std::vector<GFilename>& oadnames,
126 const std::vector<GFilename>& hkdnames = std::vector<GFilename> (),
127 const GFilename& bvcname = "");
128 void response(const GCaldb& caldb, const std::string& rspname);
129 void response(const GCOMResponse& response);
130 void obs_id(const double& id);
131 void ontime(const double& ontime);
132 void livetime(const double& livetime);
133 void deadc(const double& deadc);
134 void ewidth(const double& ewidth);
135 const double& obs_id(void) const;
136 const double& ewidth(void) const;
137 const GCOMDri& drb(void) const;
138 const GCOMDri& drw(void) const;
139 const GCOMDri& drg(void) const;
140 const GCOMDri& drx(void) const;
141 GCOMDri drm(const GModels& models) const;
142 const GCOMTim& tim(void) const;
143 void tim(const GCOMTim& tim);
144 const GCOMOads& oads(void) const;
145 void oads(const GCOMOads& oads);
146 const GCOMHkds& hkds(void) const;
147 void hkds(const GCOMHkds& hkds);
148 const GCOMBvcs& bvcs(void) const;
149 void bvcs(const GCOMBvcs& bvcs);
150 const GFilename& drename(void) const;
151 const GFilename& drbname(void) const;
152 const GFilename& drwname(void) const;
153 const GFilename& drgname(void) const;
154 const GFilename& drxname(void) const;
155 const GFilename& rspname(void) const;
156 const int& phi_first(void) const;
157 const int& phi_last(void) const;
158 void drename(const GFilename& drename);
159 void drbname(const GFilename& drbname);
160 void drwname(const GFilename& drwname);
161 void drgname(const GFilename& drgname);
162 void drxname(const GFilename& drxname);
163 void rspname(const GFilename& rspname);
164 void phi_first(const int& phi_first);
165 void phi_last(const int& phi_last);
166 void compute_drb(const std::string& method,
167 const GCOMDri& drm,
168 const int& nrunav = 3,
169 const int& navgr = 3,
170 const int& nincl = 15,
171 const int& nexcl = 0);
172
173protected:
174 // Protected methods
175 void init_members(void);
176 void copy_members(const GCOMObservation& obs);
177 void free_members(void);
178 void load_dre(const GFilename& drename);
179 void load_drb(const GFilename& drbname);
180 void load_drw(const GFilename& drwname);
181 void load_drg(const GFilename& drgname);
182 void load_drx(const GFilename& drxname);
183 bool check_dri(const GCOMDri& map) const;
184 void read_attributes(const GFitsHDU* hdu);
185 void write_attributes(GFitsHDU* hdu) const;
186 void compute_drb_phinor(const GCOMDri& drm);
187 void compute_drb_bgdlixa(const GCOMDri& drm,
188 const int& nrunav = 3,
189 const int& navgr = 3,
190 const int& nincl = 15,
191 const int& nexcl = 0);
192 void compute_drb_bgdlixe(const GCOMDri& drm,
193 const int& nrunav = 3,
194 const int& navgr = 3,
195 const int& nincl = 15,
196 const int& nexcl = 0);
197 void compute_drb_bgdlixf(const GCOMDri& drm,
198 const int& nrunav = 3,
199 const int& navgr = 3,
200 const int& nincl = 15,
201 const int& nexcl = 0);
202 GSkyMap get_weighted_drg_map(void) const;
203 void get_bgdlix_phibar_indices(const int& iphibar,
204 const int& nincl,
205 const int& nexcl,
206 int* isel1,
207 int* iex1,
208 int* iex2,
209 int* isel2) const;
210 void get_bgdlix_phibar_indices(const int& iphibar,
211 const int& nincl,
212 const int& nexcl,
213 const int& iphibar_min,
214 const int& iphibar_max,
215 int* isel1,
216 int* iex1,
217 int* iex2,
218 int* isel2) const;
219
220 // Overwritten virtual methods
221 virtual bool use_event_for_likelihood(const int& index) const;
222
223 // Protected members
224 std::string m_instrument; //!< Instrument name
225 GCOMResponse m_response; //!< Response functions
226 double m_obs_id; //!< Observation ID
227 double m_ontime; //!< Ontime (sec)
228 double m_livetime; //!< Livetime (sec)
229 double m_deadc; //!< Deadtime correction
230
231 // Protected members for binned observation
232 GFilename m_drename; //!< DRE filename
233 GFilename m_drbname; //!< DRB filename
234 GFilename m_drwname; //!< DRW filename
235 GFilename m_drgname; //!< DRG filename
236 GFilename m_drxname; //!< DRX filename
237 GFilename m_rspname; //!< Response cache filename
238 GCOMDri m_drb; //!< Background model
239 GCOMDri m_drw; //!< Weighting cube
240 GCOMDri m_drg; //!< Geometry factors
241 GCOMDri m_drx; //!< Exposure map
242 double m_ewidth; //!< Energy width (MeV)
243 int m_phi_first; //!< First Phibar layer to use for likelihood
244 int m_phi_last; //!< Last Phibar layer to use for likelihood
245
246 // Protected members for unbinned observation
247 GFilename m_evpname; //!< EVP filename
248 GFilename m_timname; //!< TIM filename
249 std::vector<GFilename> m_oadnames; //!< OAD filenames
250 std::vector<GFilename> m_hkdnames; //!< HKD filenames
251 GFilename m_bvcname; //!< BVC filename
252 GCOMTim m_tim; //!< COMPTEL Good Time Intervals
253 GCOMOads m_oads; //!< Orbit Aspect Data
254 GCOMHkds m_hkds; //!< Housekeeping Data
255 GCOMBvcs m_bvcs; //!< Solar System Barycentre Data
256};
257
258
259/***********************************************************************//**
260 * @brief Return class name
261 *
262 * @return String containing the class name ("GCOMObservation").
263 ***************************************************************************/
264inline
265std::string GCOMObservation::classname(void) const
266{
267 return ("GCOMObservation");
268}
269
270
271/***********************************************************************//**
272 * @brief Return response function
273 *
274 * @return Response function.
275 ***************************************************************************/
276inline
278{
279 // Return response pointer
280 return &m_response;
281}
282
283
284/***********************************************************************//**
285 * @brief Set response function
286 *
287 * @param[in] response Response function.
288 ***************************************************************************/
289inline
291{
293 return;
294}
295
296
297/***********************************************************************//**
298 * @brief Return instrument
299 *
300 * @return Instrument name.
301 ***************************************************************************/
302inline
303std::string GCOMObservation::instrument(void) const
304{
305 // Return instrument
306 return (m_instrument);
307}
308
309
310/***********************************************************************//**
311 * @brief Return ontime
312 *
313 * @return Ontime (seconds).
314 ***************************************************************************/
315inline
316double GCOMObservation::ontime(void) const
317{
318 // Return ontime
319 return (m_ontime);
320}
321
322
323/***********************************************************************//**
324 * @brief Return livetime
325 *
326 * @return Livetime (seconds).
327 ***************************************************************************/
328inline
330{
331 // Return livetime
332 return (m_livetime);
333}
334
335
336/***********************************************************************//**
337 * @brief Return deadtime correction factor
338 *
339 * @param[in] time Time.
340 *
341 * @return Deadtime correction factor.
342 ***************************************************************************/
343inline
344double GCOMObservation::deadc(const GTime& time) const
345{
346 // Return livetime
347 return (m_deadc);
348}
349
350
351/***********************************************************************//**
352 * @brief Set observation ID
353 *
354 * @param[in] id Observation ID.
355 ***************************************************************************/
356inline
357void GCOMObservation::obs_id(const double& id)
358{
359 m_obs_id = id;
360 return;
361}
362
363
364/***********************************************************************//**
365 * @brief Set ontime
366 *
367 * @param[in] ontime Ontime.
368 ***************************************************************************/
369inline
370void GCOMObservation::ontime(const double& ontime)
371{
373 return;
374}
375
376
377/***********************************************************************//**
378 * @brief Set livetime
379 *
380 * @param[in] livetime Livetime.
381 ***************************************************************************/
382inline
383void GCOMObservation::livetime(const double& livetime)
384{
386 return;
387}
388
389
390/***********************************************************************//**
391 * @brief Set deadtime correction factor
392 *
393 * @param[in] deadc Deadtime correction factor.
394 ***************************************************************************/
395inline
396void GCOMObservation::deadc(const double& deadc)
397{
398 m_deadc = deadc;
399 return;
400}
401
402
403/***********************************************************************//**
404 * @brief Set energy width
405 *
406 * @param[in] ewidth Energy width (MeV).
407 ***************************************************************************/
408inline
409void GCOMObservation::ewidth(const double& ewidth)
410{
412 return;
413}
414
415
416/***********************************************************************//**
417 * @brief Return observation ID
418 *
419 * @return Observation ID.
420 ***************************************************************************/
421inline
422const double& GCOMObservation::obs_id(void) const
423{
424 // Return observation ID
425 return (m_obs_id);
426}
427
428
429/***********************************************************************//**
430 * @brief Return energy width
431 *
432 * @return Energy width (MeV).
433 ***************************************************************************/
434inline
435const double& GCOMObservation::ewidth(void) const
436{
437 // Return energy width
438 return (m_ewidth);
439}
440
441
442/***********************************************************************//**
443 * @brief Return background model
444 *
445 * @return Background model.
446 ***************************************************************************/
447inline
449{
450 // Return background model
451 return (m_drb);
452}
453
454
455/***********************************************************************//**
456 * @brief Return weighting cube
457 *
458 * @return Weighting cube.
459 ***************************************************************************/
460inline
462{
463 // Return weighting cube
464 return (m_drw);
465}
466
467
468/***********************************************************************//**
469 * @brief Return geometry factors
470 *
471 * @return Geometry factors.
472 ***************************************************************************/
473inline
475{
476 // Return geometry factors
477 return (m_drg);
478}
479
480
481/***********************************************************************//**
482 * @brief Return exposure
483 *
484 * @return Exposure.
485 ***************************************************************************/
486inline
488{
489 // Return exposure
490 return (m_drx);
491}
492
493
494/***********************************************************************//**
495 * @brief Return COMPTEL Good Time Intervals
496 *
497 * @return COMPTEL Good Time Intervals.
498 ***************************************************************************/
499inline
501{
502 // Return COMPTEL Good Time Intervals
503 return (m_tim);
504}
505
506
507/***********************************************************************//**
508 * @brief Set COMPTEL Good Time Intervals
509 *
510 * @param[in] tim COMPTEL Good Time Intervals.
511 ***************************************************************************/
512inline
514{
515 m_tim = tim;
516 return;
517}
518
519
520/***********************************************************************//**
521 * @brief Return Orbit Aspect Data
522 *
523 * @return Orbit Aspect Data
524 ***************************************************************************/
525inline
527{
528 // Return Orbit Aspect Data
529 return (m_oads);
530}
531
532
533/***********************************************************************//**
534 * @brief Set Orbit Aspect Data
535 *
536 * @param[in] oads Orbit Aspect Data.
537 ***************************************************************************/
538inline
540{
541 m_oads = oads;
542 return;
543}
544
545
546/***********************************************************************//**
547 * @brief Return Housekeeping Data collection
548 *
549 * @return Housekeeping Data collection
550 ***************************************************************************/
551inline
553{
554 // Return Housekeeping Data collection
555 return (m_hkds);
556}
557
558
559/***********************************************************************//**
560 * @brief Set Housekeeping Data collection
561 *
562 * @param[in] hkds Housekeeping Data collection.
563 ***************************************************************************/
564inline
566{
567 m_hkds = hkds;
568 return;
569}
570
571
572/***********************************************************************//**
573 * @brief Return Solar System Barycentre Data
574 *
575 * @return Solar System Barycentre Data
576 ***************************************************************************/
577inline
579{
580 // Return Solar System Barycentre Data
581 return (m_bvcs);
582}
583
584
585/***********************************************************************//**
586 * @brief Set Solar System Barycentre Data
587 *
588 * @param[in] bvcs Solar System Barycentre Data.
589 ***************************************************************************/
590inline
592{
593 m_bvcs = bvcs;
594 return;
595}
596
597
598/***********************************************************************//**
599 * @brief Check whether observation is unbinned
600 *
601 * @return True if observation is unbinned.
602 ***************************************************************************/
603inline
605{
606 return (dynamic_cast<const GCOMEventList*>(m_events) != NULL);
607}
608
609
610/***********************************************************************//**
611 * @brief Check whether observation is binned
612 *
613 * @return True if observation is unbinned.
614 ***************************************************************************/
615inline
617{
618 return (dynamic_cast<const GCOMEventCube*>(m_events) != NULL);
619}
620
621
622/***********************************************************************//**
623 * @brief Return DRE filename
624 *
625 * @return DRE filename.
626 ***************************************************************************/
627inline
629{
630 // Return DRE filename
631 return (m_drename);
632}
633
634
635/***********************************************************************//**
636 * @brief Return DRB filename
637 *
638 * @return DRB filename.
639 ***************************************************************************/
640inline
642{
643 // Return DRB filename
644 return (m_drbname);
645}
646
647
648/***********************************************************************//**
649 * @brief Return DRW filename
650 *
651 * @return DRW filename.
652 ***************************************************************************/
653inline
655{
656 // Return DRW filename
657 return (m_drwname);
658}
659
660
661/***********************************************************************//**
662 * @brief Return DRG filename
663 *
664 * @return DRG filename.
665 ***************************************************************************/
666inline
668{
669 // Return DRG filename
670 return (m_drgname);
671}
672
673
674/***********************************************************************//**
675 * @brief Return DRX filename
676 *
677 * @return DRX filename.
678 ***************************************************************************/
679inline
681{
682 // Return DRX filename
683 return (m_drxname);
684}
685
686
687/***********************************************************************//**
688 * @brief Return response cache filename
689 *
690 * @return Response cache filename.
691 ***************************************************************************/
692inline
694{
695 // Return response cache filename
696 return (m_rspname);
697}
698
699
700/***********************************************************************//**
701 * @brief Return index of first Phibar layer to be used for likelihood fitting
702 *
703 * @return Index of first Phibar layer.
704 ***************************************************************************/
705inline
706const int& GCOMObservation::phi_first(void) const
707{
708 // Return index of first Phibar layer
709 return (m_phi_first);
710}
711
712
713/***********************************************************************//**
714 * @brief Return index of last Phibar layer to be used for likelihood fitting
715 *
716 * @return Index of last Phibar layer.
717 ***************************************************************************/
718inline
719const int& GCOMObservation::phi_last(void) const
720{
721 // Return index of last Phibar layer
722 return (m_phi_last);
723}
724
725
726/***********************************************************************//**
727 * @brief Set DRE filename
728 *
729 * @param[in] drename DRE filename.
730 ***************************************************************************/
731inline
733{
735 return;
736}
737
738
739/***********************************************************************//**
740 * @brief Set DRB filename
741 *
742 * @param[in] drbname DRB filename.
743 ***************************************************************************/
744inline
746{
748 return;
749}
750
751
752/***********************************************************************//**
753 * @brief Set DRW filename
754 *
755 * @param[in] drwname DRW filename.
756 ***************************************************************************/
757inline
759{
761 return;
762}
763
764
765/***********************************************************************//**
766 * @brief Set DRG filename
767 *
768 * @param[in] drgname DRG filename.
769 ***************************************************************************/
770inline
772{
774 return;
775}
776
777
778/***********************************************************************//**
779 * @brief Set DRX filename
780 *
781 * @param[in] drxname DRX filename.
782 ***************************************************************************/
783inline
785{
787 return;
788}
789
790
791/***********************************************************************//**
792 * @brief Set response cache filename filename
793 *
794 * @param[in] rspname Response cache filename.
795 ***************************************************************************/
796inline
798{
800 return;
801}
802
803
804/***********************************************************************//**
805 * @brief Set index of first Phibar layer to be used for likelihood fitting
806 *
807 * @param[in] phi_first Index of first Phibar layer.
808 ***************************************************************************/
809inline
810void GCOMObservation::phi_first(const int& phi_first)
811{
813 return;
814}
815
816
817/***********************************************************************//**
818 * @brief Set index of last Phibar layer to be used for likelihood fitting
819 *
820 * @param[in] phi_last Index of last Phibar layer.
821 ***************************************************************************/
822inline
823void GCOMObservation::phi_last(const int& phi_last)
824{
826 return;
827}
828
829#endif /* GCOMOBSERVATION_HPP */
COMPTEL Solar System Barycentre Data container class definition.
COMPTEL Data Space class definition.
COMPTEL event bin container class interface definition.
COMPTEL event list class definition.
COMPTEL Housekeeping Data collection class definition.
COMPTEL Orbit Aspect Data container class definition.
COMPTEL instrument response function class interface definition.
COMPTEL Good Time Intervals class definition.
Filename class interface definition.
Abstract observation base class interface definition.
Time class interface definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
COMPTEL Solar System Barycentre Data container class.
Definition GCOMBvcs.hpp:54
COMPTEL Data Space class.
Definition GCOMDri.hpp:62
COMPTEL event bin container class.
COMPTEL event list class.
COMPTEL Housekeeping Data collection class.
Definition GCOMHkds.hpp:51
COMPTEL Orbit Aspect Data container class.
Definition GCOMOads.hpp:51
Interface class for COMPTEL observations.
void free_members(void)
Delete class members.
GCOMDri m_drw
Weighting cube.
const GCOMTim & tim(void) const
Return COMPTEL Good Time Intervals.
GCOMDri drm(const GModels &models) const
Compute DRM cube.
void init_members(void)
Initialise class members.
const GFilename & drename(void) const
Return DRE filename.
const double & obs_id(void) const
Return observation ID.
GFilename m_drgname
DRG filename.
bool is_unbinned(void) const
Check whether observation is unbinned.
void compute_drb_phinor(const GCOMDri &drm)
Compute DRB cube using PHINOR method.
void load(const GFilename &drename, const GFilename &drbname, const GFilename &drwname, const GFilename &drgname, const GFilename &drxname)
Load data for a binned observation.
GFilename m_drxname
DRX filename.
const GFilename & drgname(void) const
Return DRG filename.
const GFilename & drxname(void) const
Return DRX filename.
double m_ontime
Ontime (sec)
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.
bool check_dri(const GCOMDri &map) const
Check if DRI is compatible with event cube.
virtual double npred(const GModel &model) const
Return total number of predicted counts for one model.
const GCOMDri & drb(void) const
Return background model.
virtual double ontime(void) const
Return ontime.
virtual GCOMObservation * clone(void) const
Clone COMPTEL observation.
GCOMBvcs m_bvcs
Solar System Barycentre Data.
void read_attributes(const GFitsHDU *hdu)
Read observation attributes.
const int & phi_first(void) const
Return index of first Phibar layer to be used for likelihood fitting.
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.
const GCOMOads & oads(void) const
Return Orbit Aspect Data.
int m_phi_last
Last Phibar layer to use for likelihood.
const double & ewidth(void) const
Return energy width.
GFilename m_drename
DRE filename.
void load_drg(const GFilename &drgname)
Load geometry factors from DRG file.
virtual std::string instrument(void) const
Return instrument.
double m_livetime
Livetime (sec)
virtual double grad_step_size(const GModelPar &par) const
Return gradient step size for a given model parameter.
std::vector< GFilename > m_hkdnames
HKD filenames.
const GCOMBvcs & bvcs(void) const
Return Solar System Barycentre Data.
virtual void read(const GXmlElement &xml)
Read observation from XML element.
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.
GSkyMap get_weighted_drg_map(void) const
Return weighted DRG map.
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.
virtual void clear(void)
Clear COMPTEL observation.
GCOMHkds m_hkds
Housekeeping Data.
double m_obs_id
Observation ID.
virtual void write(GXmlElement &xml) const
Write observation into XML element.
GCOMOads m_oads
Orbit Aspect Data.
virtual double deadc(const GTime &time=GTime()) const
Return deadtime correction factor.
int m_phi_first
First Phibar layer to use for likelihood.
GCOMObservation(void)
Void constructor.
GCOMTim m_tim
COMPTEL Good Time Intervals.
GCOMDri m_drg
Geometry factors.
virtual const GCOMResponse * response(void) const
Return response function.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print observation information.
const GCOMDri & drw(void) const
Return weighting cube.
GCOMDri m_drb
Background model.
bool is_binned(void) const
Check whether observation is binned.
void load_dre(const GFilename &drename)
Load event cube data from DRE file.
const int & phi_last(void) const
Return index of last Phibar layer to be used for likelihood fitting.
void write_attributes(GFitsHDU *hdu) const
Write observation attributes.
void load_drw(const GFilename &drwname)
Load weighting cube from DRW file.
const GFilename & drwname(void) const
Return DRW filename.
double m_ewidth
Energy width (MeV)
const GFilename & rspname(void) const
Return response cache filename.
GFilename m_drbname
DRB filename.
GFilename m_evpname
EVP filename.
virtual bool use_event_for_likelihood(const int &index) const
Check whether bin should be used for likelihood analysis.
const GCOMDri & drx(void) const
Return exposure.
void get_bgdlix_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 BGDLIX background methods.
double m_deadc
Deadtime correction.
virtual std::string classname(void) const
Return class name.
const GCOMDri & drg(void) const
Return geometry factors.
virtual double livetime(void) const
Return livetime.
const GFilename & drbname(void) const
Return DRB filename.
GFilename m_timname
TIM filename.
GFilename m_drwname
DRW filename.
GCOMResponse m_response
Response functions.
std::vector< GFilename > m_oadnames
OAD filenames.
virtual ~GCOMObservation(void)
Destructor.
std::string m_instrument
Instrument name.
GFilename m_bvcname
BVC filename.
const GCOMHkds & hkds(void) const
Return Housekeeping Data collection.
void load_drx(const GFilename &drxname)
Load exposure from DRX file.
void copy_members(const GCOMObservation &obs)
Copy class members.
void load_drb(const GFilename &drbname)
Load background model from DRB file.
virtual GCOMObservation & operator=(const GCOMObservation &obs)
Assignment operator.
GCOMDri m_drx
Exposure map.
GFilename m_rspname
Response cache filename.
Interface for the COMPTEL instrument response function.
COMPTEL instrument status class.
COMPTEL Good Time Intervals class.
Definition GCOMTim.hpp:50
Calibration database class.
Definition GCaldb.hpp:66
Filename class.
Definition GFilename.hpp:62
Abstract FITS extension base class.
Definition GFitsHDU.hpp:51
Model parameter class.
Definition GModelPar.hpp:87
Sky model class.
Abstract model class.
Definition GModel.hpp:100
Model container class.
Definition GModels.hpp:152
Abstract observation base class.
virtual double model(const GModels &models, const GEvent &event, GVector *gradients=NULL) const
Return model value and (optionally) gradients.
const std::string & id(void) const
Return observation identifier.
GEvents * m_events
Pointer to event container.
Abstract instrument response base class.
Definition GResponse.hpp:77
Sky map class.
Definition GSkyMap.hpp:89
Time class.
Definition GTime.hpp:55
XML element node class.