GammaLib 2.1.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-2024 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_bgdlixa_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
211 // Overwritten virtual methods
212 virtual bool use_event_for_likelihood(const int& index) const;
213
214 // Protected members
215 std::string m_instrument; //!< Instrument name
216 GCOMResponse m_response; //!< Response functions
217 double m_obs_id; //!< Observation ID
218 double m_ontime; //!< Ontime (sec)
219 double m_livetime; //!< Livetime (sec)
220 double m_deadc; //!< Deadtime correction
221
222 // Protected members for binned observation
223 GFilename m_drename; //!< DRE filename
224 GFilename m_drbname; //!< DRB filename
225 GFilename m_drwname; //!< DRW filename
226 GFilename m_drgname; //!< DRG filename
227 GFilename m_drxname; //!< DRX filename
228 GFilename m_rspname; //!< Response cache filename
229 GCOMDri m_drb; //!< Background model
230 GCOMDri m_drw; //!< Weighting cube
231 GCOMDri m_drg; //!< Geometry factors
232 GCOMDri m_drx; //!< Exposure map
233 double m_ewidth; //!< Energy width (MeV)
234 int m_phi_first; //!< First Phibar layer to use for likelihood
235 int m_phi_last; //!< Last Phibar layer to use for likelihood
236
237 // Protected members for unbinned observation
238 GFilename m_evpname; //!< EVP filename
239 GFilename m_timname; //!< TIM filename
240 std::vector<GFilename> m_oadnames; //!< OAD filenames
241 std::vector<GFilename> m_hkdnames; //!< HKD filenames
242 GFilename m_bvcname; //!< BVC filename
243 GCOMTim m_tim; //!< COMPTEL Good Time Intervals
244 GCOMOads m_oads; //!< Orbit Aspect Data
245 GCOMHkds m_hkds; //!< Housekeeping Data
246 GCOMBvcs m_bvcs; //!< Solar System Barycentre Data
247};
248
249
250/***********************************************************************//**
251 * @brief Return class name
252 *
253 * @return String containing the class name ("GCOMObservation").
254 ***************************************************************************/
255inline
256std::string GCOMObservation::classname(void) const
257{
258 return ("GCOMObservation");
259}
260
261
262/***********************************************************************//**
263 * @brief Return response function
264 *
265 * @return Response function.
266 ***************************************************************************/
267inline
269{
270 // Return response pointer
271 return &m_response;
272}
273
274
275/***********************************************************************//**
276 * @brief Set response function
277 *
278 * @param[in] response Response function.
279 ***************************************************************************/
280inline
282{
284 return;
285}
286
287
288/***********************************************************************//**
289 * @brief Return instrument
290 *
291 * @return Instrument name.
292 ***************************************************************************/
293inline
294std::string GCOMObservation::instrument(void) const
295{
296 // Return instrument
297 return (m_instrument);
298}
299
300
301/***********************************************************************//**
302 * @brief Return ontime
303 *
304 * @return Ontime (seconds).
305 ***************************************************************************/
306inline
307double GCOMObservation::ontime(void) const
308{
309 // Return ontime
310 return (m_ontime);
311}
312
313
314/***********************************************************************//**
315 * @brief Return livetime
316 *
317 * @return Livetime (seconds).
318 ***************************************************************************/
319inline
321{
322 // Return livetime
323 return (m_livetime);
324}
325
326
327/***********************************************************************//**
328 * @brief Return deadtime correction factor
329 *
330 * @param[in] time Time.
331 *
332 * @return Deadtime correction factor.
333 ***************************************************************************/
334inline
335double GCOMObservation::deadc(const GTime& time) const
336{
337 // Return livetime
338 return (m_deadc);
339}
340
341
342/***********************************************************************//**
343 * @brief Set observation ID
344 *
345 * @param[in] id Observation ID.
346 ***************************************************************************/
347inline
348void GCOMObservation::obs_id(const double& id)
349{
350 m_obs_id = id;
351 return;
352}
353
354
355/***********************************************************************//**
356 * @brief Set ontime
357 *
358 * @param[in] ontime Ontime.
359 ***************************************************************************/
360inline
361void GCOMObservation::ontime(const double& ontime)
362{
364 return;
365}
366
367
368/***********************************************************************//**
369 * @brief Set livetime
370 *
371 * @param[in] livetime Livetime.
372 ***************************************************************************/
373inline
374void GCOMObservation::livetime(const double& livetime)
375{
377 return;
378}
379
380
381/***********************************************************************//**
382 * @brief Set deadtime correction factor
383 *
384 * @param[in] deadc Deadtime correction factor.
385 ***************************************************************************/
386inline
387void GCOMObservation::deadc(const double& deadc)
388{
389 m_deadc = deadc;
390 return;
391}
392
393
394/***********************************************************************//**
395 * @brief Set energy width
396 *
397 * @param[in] ewidth Energy width (MeV).
398 ***************************************************************************/
399inline
400void GCOMObservation::ewidth(const double& ewidth)
401{
403 return;
404}
405
406
407/***********************************************************************//**
408 * @brief Return observation ID
409 *
410 * @return Observation ID.
411 ***************************************************************************/
412inline
413const double& GCOMObservation::obs_id(void) const
414{
415 // Return observation ID
416 return (m_obs_id);
417}
418
419
420/***********************************************************************//**
421 * @brief Return energy width
422 *
423 * @return Energy width (MeV).
424 ***************************************************************************/
425inline
426const double& GCOMObservation::ewidth(void) const
427{
428 // Return energy width
429 return (m_ewidth);
430}
431
432
433/***********************************************************************//**
434 * @brief Return background model
435 *
436 * @return Background model.
437 ***************************************************************************/
438inline
440{
441 // Return background model
442 return (m_drb);
443}
444
445
446/***********************************************************************//**
447 * @brief Return weighting cube
448 *
449 * @return Weighting cube.
450 ***************************************************************************/
451inline
453{
454 // Return weighting cube
455 return (m_drw);
456}
457
458
459/***********************************************************************//**
460 * @brief Return geometry factors
461 *
462 * @return Geometry factors.
463 ***************************************************************************/
464inline
466{
467 // Return geometry factors
468 return (m_drg);
469}
470
471
472/***********************************************************************//**
473 * @brief Return exposure
474 *
475 * @return Exposure.
476 ***************************************************************************/
477inline
479{
480 // Return exposure
481 return (m_drx);
482}
483
484
485/***********************************************************************//**
486 * @brief Return COMPTEL Good Time Intervals
487 *
488 * @return COMPTEL Good Time Intervals.
489 ***************************************************************************/
490inline
492{
493 // Return COMPTEL Good Time Intervals
494 return (m_tim);
495}
496
497
498/***********************************************************************//**
499 * @brief Set COMPTEL Good Time Intervals
500 *
501 * @param[in] tim COMPTEL Good Time Intervals.
502 ***************************************************************************/
503inline
505{
506 m_tim = tim;
507 return;
508}
509
510
511/***********************************************************************//**
512 * @brief Return Orbit Aspect Data
513 *
514 * @return Orbit Aspect Data
515 ***************************************************************************/
516inline
518{
519 // Return Orbit Aspect Data
520 return (m_oads);
521}
522
523
524/***********************************************************************//**
525 * @brief Set Orbit Aspect Data
526 *
527 * @param[in] oads Orbit Aspect Data.
528 ***************************************************************************/
529inline
531{
532 m_oads = oads;
533 return;
534}
535
536
537/***********************************************************************//**
538 * @brief Return Housekeeping Data collection
539 *
540 * @return Housekeeping Data collection
541 ***************************************************************************/
542inline
544{
545 // Return Housekeeping Data collection
546 return (m_hkds);
547}
548
549
550/***********************************************************************//**
551 * @brief Set Housekeeping Data collection
552 *
553 * @param[in] hkds Housekeeping Data collection.
554 ***************************************************************************/
555inline
557{
558 m_hkds = hkds;
559 return;
560}
561
562
563/***********************************************************************//**
564 * @brief Return Solar System Barycentre Data
565 *
566 * @return Solar System Barycentre Data
567 ***************************************************************************/
568inline
570{
571 // Return Solar System Barycentre Data
572 return (m_bvcs);
573}
574
575
576/***********************************************************************//**
577 * @brief Set Solar System Barycentre Data
578 *
579 * @param[in] bvcs Solar System Barycentre Data.
580 ***************************************************************************/
581inline
583{
584 m_bvcs = bvcs;
585 return;
586}
587
588
589/***********************************************************************//**
590 * @brief Check whether observation is unbinned
591 *
592 * @return True if observation is unbinned.
593 ***************************************************************************/
594inline
596{
597 return (dynamic_cast<const GCOMEventList*>(m_events) != NULL);
598}
599
600
601/***********************************************************************//**
602 * @brief Check whether observation is binned
603 *
604 * @return True if observation is unbinned.
605 ***************************************************************************/
606inline
608{
609 return (dynamic_cast<const GCOMEventCube*>(m_events) != NULL);
610}
611
612
613/***********************************************************************//**
614 * @brief Return DRE filename
615 *
616 * @return DRE filename.
617 ***************************************************************************/
618inline
620{
621 // Return DRE filename
622 return (m_drename);
623}
624
625
626/***********************************************************************//**
627 * @brief Return DRB filename
628 *
629 * @return DRB filename.
630 ***************************************************************************/
631inline
633{
634 // Return DRB filename
635 return (m_drbname);
636}
637
638
639/***********************************************************************//**
640 * @brief Return DRW filename
641 *
642 * @return DRW filename.
643 ***************************************************************************/
644inline
646{
647 // Return DRW filename
648 return (m_drwname);
649}
650
651
652/***********************************************************************//**
653 * @brief Return DRG filename
654 *
655 * @return DRG filename.
656 ***************************************************************************/
657inline
659{
660 // Return DRG filename
661 return (m_drgname);
662}
663
664
665/***********************************************************************//**
666 * @brief Return DRX filename
667 *
668 * @return DRX filename.
669 ***************************************************************************/
670inline
672{
673 // Return DRX filename
674 return (m_drxname);
675}
676
677
678/***********************************************************************//**
679 * @brief Return response cache filename
680 *
681 * @return Response cache filename.
682 ***************************************************************************/
683inline
685{
686 // Return response cache filename
687 return (m_rspname);
688}
689
690
691/***********************************************************************//**
692 * @brief Return index of first Phibar layer to be used for likelihood fitting
693 *
694 * @return Index of first Phibar layer.
695 ***************************************************************************/
696inline
697const int& GCOMObservation::phi_first(void) const
698{
699 // Return index of first Phibar layer
700 return (m_phi_first);
701}
702
703
704/***********************************************************************//**
705 * @brief Return index of last Phibar layer to be used for likelihood fitting
706 *
707 * @return Index of last Phibar layer.
708 ***************************************************************************/
709inline
710const int& GCOMObservation::phi_last(void) const
711{
712 // Return index of last Phibar layer
713 return (m_phi_last);
714}
715
716
717/***********************************************************************//**
718 * @brief Set DRE filename
719 *
720 * @param[in] drename DRE filename.
721 ***************************************************************************/
722inline
724{
726 return;
727}
728
729
730/***********************************************************************//**
731 * @brief Set DRB filename
732 *
733 * @param[in] drbname DRB filename.
734 ***************************************************************************/
735inline
737{
739 return;
740}
741
742
743/***********************************************************************//**
744 * @brief Set DRW filename
745 *
746 * @param[in] drwname DRW filename.
747 ***************************************************************************/
748inline
750{
752 return;
753}
754
755
756/***********************************************************************//**
757 * @brief Set DRG filename
758 *
759 * @param[in] drgname DRG filename.
760 ***************************************************************************/
761inline
763{
765 return;
766}
767
768
769/***********************************************************************//**
770 * @brief Set DRX filename
771 *
772 * @param[in] drxname DRX filename.
773 ***************************************************************************/
774inline
776{
778 return;
779}
780
781
782/***********************************************************************//**
783 * @brief Set response cache filename filename
784 *
785 * @param[in] rspname Response cache filename.
786 ***************************************************************************/
787inline
789{
791 return;
792}
793
794
795/***********************************************************************//**
796 * @brief Set index of first Phibar layer to be used for likelihood fitting
797 *
798 * @param[in] phi_first Index of first Phibar layer.
799 ***************************************************************************/
800inline
801void GCOMObservation::phi_first(const int& phi_first)
802{
804 return;
805}
806
807
808/***********************************************************************//**
809 * @brief Set index of last Phibar layer to be used for likelihood fitting
810 *
811 * @param[in] phi_last Index of last Phibar layer.
812 ***************************************************************************/
813inline
814void GCOMObservation::phi_last(const int& phi_last)
815{
817 return;
818}
819
820#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.
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.
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.
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.