Commit f5eb08386872b2ae16002efdd680c7c99ce598d8

Authored by Jürgen Knödlseder
1 parent a4075c60

Observation container constructor now always takes a const reference as argument.

pyext/ctbin.i
... ... @@ -39,7 +39,7 @@ class ctbin : public GApplication {
39 39 public:
40 40 // Constructors and destructors
41 41 ctbin(void);
42   - explicit ctbin(GObservations obs);
  42 + explicit ctbin(const GObservations& obs);
43 43 ctbin(int argc, char *argv[]);
44 44 ctbin(const ctbin& app);
45 45 virtual ~ctbin(void);
... ...
pyext/ctexpcube.i
... ... @@ -40,7 +40,7 @@ class ctexpcube : public GApplication {
40 40 public:
41 41 // Constructors and destructors
42 42 ctexpcube(void);
43   - explicit ctexpcube(GObservations obs);
  43 + explicit ctexpcube(const GObservations& obs);
44 44 ctexpcube(int argc, char *argv[]);
45 45 ctexpcube(const ctexpcube& app);
46 46 virtual ~ctexpcube(void);
... ...
pyext/ctlike.i
1 1 /***************************************************************************
2 2 * ctlike - CTA maximum likelihood tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2012 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -40,7 +40,7 @@ class ctlike : public GApplication {
40 40 public:
41 41 // Constructors and destructors
42 42 ctlike(void);
43   - explicit ctlike(GObservations obs);
  43 + explicit ctlike(const GObservations& obs);
44 44 ctlike(int argc, char *argv[]);
45 45 ctlike(const ctlike& app);
46 46 virtual ~ctlike(void);
... ...
pyext/ctmodel.i
1 1 /***************************************************************************
2 2 * ctmodel - CTA counts model tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -40,7 +40,7 @@ class ctmodel : public GApplication {
40 40 public:
41 41 // Constructors and destructors
42 42 ctmodel(void);
43   - explicit ctmodel(GObservations obs);
  43 + explicit ctmodel(const GObservations& obs);
44 44 ctmodel(int argc, char *argv[]);
45 45 ctmodel(const ctmodel& app);
46 46 virtual ~ctmodel(void);
... ...
pyext/ctobssim.i
1 1 /***************************************************************************
2 2 * ctobssim - CTA observation simulation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011 by Jurgen Knodlseder *
  4 + * copyright (C) 2011-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -39,7 +39,7 @@ class ctobssim : public GApplication {
39 39 public:
40 40 // Constructors and destructors
41 41 ctobssim(void);
42   - explicit ctobssim(GObservations obs);
  42 + explicit ctobssim(const GObservations& obs);
43 43 ctobssim(int argc, char *argv[]);
44 44 ctobssim(const ctobssim& app);
45 45 virtual ~ctobssim(void);
... ...
pyext/ctselect.i
1 1 /***************************************************************************
2 2 * ctselect - CTA data selection tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2011 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2014 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -39,7 +39,7 @@ class ctselect : public GApplication {
39 39 public:
40 40 // Constructors and destructors
41 41 ctselect(void);
42   - explicit ctselect(GObservations obs);
  42 + explicit ctselect(const GObservations& obs);
43 43 ctselect(int argc, char *argv[]);
44 44 ctselect(const ctselect& app);
45 45 virtual ~ctselect(void);
... ...
pyext/ctskymap.i
1 1 /***************************************************************************
2 2 * ctskymap - CTA sky mapping tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2014 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -39,7 +39,7 @@ class ctskymap : public GApplication {
39 39 public:
40 40 // Constructors and destructors
41 41 ctskymap(void);
42   - explicit ctskymap(GObservations obs);
  42 + explicit ctskymap(const GObservations& obs);
43 43 ctskymap(int argc, char *argv[]);
44 44 ctskymap(const ctskymap& app);
45 45 virtual ~ctskymap(void);
... ...
src/ctbin/ctbin.cpp
... ... @@ -69,10 +69,13 @@ ctbin::ctbin(void) : GApplication(CTBIN_NAME, CTBIN_VERSION)
69 69 /***********************************************************************//**
70 70 * @brief Observations constructor
71 71 *
  72 + * param[in] obs Observation container.
  73 + *
72 74 * This method creates an instance of the class by copying an existing
73 75 * observations container.
74 76 ***************************************************************************/
75   -ctbin::ctbin(GObservations obs) : GApplication(CTBIN_NAME, CTBIN_VERSION)
  77 +ctbin::ctbin(const GObservations& obs) :
  78 + GApplication(CTBIN_NAME, CTBIN_VERSION)
76 79 {
77 80 // Initialise members
78 81 init_members();
... ...
src/ctbin/ctbin.hpp
... ... @@ -64,7 +64,7 @@ class ctbin : public GApplication {
64 64 public:
65 65 // Constructors and destructors
66 66 ctbin(void);
67   - explicit ctbin(GObservations obs);
  67 + explicit ctbin(const GObservations& obs);
68 68 ctbin(int argc, char *argv[]);
69 69 ctbin(const ctbin& app);
70 70 virtual ~ctbin(void);
... ...
src/ctcubemask/ctcubemask.cpp
... ... @@ -67,6 +67,8 @@ ctcubemask::ctcubemask(void) : GApplication(CTCUBEMASK_NAME, CTCUBEMASK_VERSION)
67 67 /***********************************************************************//**
68 68 * @brief Observations constructor
69 69 *
  70 + * param[in] obs Observation container.
  71 + *
70 72 * This constructor creates an instance of the class that is initialised from
71 73 * an observation container.
72 74 ***************************************************************************/
... ...
src/ctexpcube/ctexpcube.cpp
... ... @@ -68,10 +68,13 @@ ctexpcube::ctexpcube(void) : GApplication(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
68 68 /***********************************************************************//**
69 69 * @brief Observations constructor
70 70 *
  71 + * param[in] obs Observation container.
  72 + *
71 73 * This method creates an instance of the class by copying an existing
72 74 * observations container.
73 75 ***************************************************************************/
74   -ctexpcube::ctexpcube(GObservations obs) : GApplication(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
  76 +ctexpcube::ctexpcube(const GObservations& obs) :
  77 + GApplication(CTEXPCUBE_NAME, CTEXPCUBE_VERSION)
75 78 {
76 79 // Initialise members
77 80 init_members();
... ...
src/ctexpcube/ctexpcube.hpp
... ... @@ -46,7 +46,7 @@ class ctexpcube : public GApplication {
46 46 public:
47 47 // Constructors and destructors
48 48 ctexpcube(void);
49   - explicit ctexpcube(GObservations obs);
  49 + explicit ctexpcube(const GObservations& obs);
50 50 ctexpcube(int argc, char *argv[]);
51 51 ctexpcube(const ctexpcube& app);
52 52 virtual ~ctexpcube(void);
... ...
src/ctlike/ctlike.cpp
... ... @@ -65,10 +65,13 @@ ctlike::ctlike(void) : GApplication(CTLIKE_NAME, CTLIKE_VERSION)
65 65 /***********************************************************************//**
66 66 * @brief Observations constructor
67 67 *
  68 + * param[in] obs Observation container.
  69 + *
68 70 * This method creates an instance of the class by copying an existing
69 71 * observations container.
70 72 ***************************************************************************/
71   -ctlike::ctlike(GObservations obs) : GApplication(CTLIKE_NAME, CTLIKE_VERSION)
  73 +ctlike::ctlike(const GObservations& obs) :
  74 + GApplication(CTLIKE_NAME, CTLIKE_VERSION)
72 75 {
73 76 // Initialise members
74 77 init_members();
... ...
src/ctlike/ctlike.hpp
... ... @@ -46,7 +46,7 @@ class ctlike : public GApplication {
46 46 public:
47 47 // Constructors and destructors
48 48 ctlike(void);
49   - explicit ctlike(GObservations obs);
  49 + explicit ctlike(const GObservations& obs);
50 50 ctlike(int argc, char *argv[]);
51 51 ctlike(const ctlike& app);
52 52 virtual ~ctlike(void);
... ...
src/ctmodel/ctmodel.cpp
... ... @@ -66,10 +66,13 @@ ctmodel::ctmodel(void) : GApplication(CTMODEL_NAME, CTMODEL_VERSION)
66 66 /***********************************************************************//**
67 67 * @brief Observations constructor
68 68 *
  69 + * param[in] obs Observation container.
  70 + *
69 71 * This method creates an instance of the class by copying an existing
70 72 * observations container.
71 73 ***************************************************************************/
72   -ctmodel::ctmodel(GObservations obs) : GApplication(CTMODEL_NAME, CTMODEL_VERSION)
  74 +ctmodel::ctmodel(const GObservations& obs) :
  75 + GApplication(CTMODEL_NAME, CTMODEL_VERSION)
73 76 {
74 77 // Initialise members
75 78 init_members();
... ...
src/ctmodel/ctmodel.hpp
... ... @@ -55,7 +55,7 @@ class ctmodel : public GApplication {
55 55 public:
56 56 // Constructors and destructors
57 57 ctmodel(void);
58   - explicit ctmodel(GObservations obs);
  58 + explicit ctmodel(const GObservations& obs);
59 59 ctmodel(int argc, char *argv[]);
60 60 ctmodel(const ctmodel& app);
61 61 virtual ~ctmodel(void);
... ...
src/ctobssim/ctobssim.cpp
... ... @@ -73,7 +73,7 @@ ctobssim::ctobssim(void) : GApplication(CTOBSSIM_NAME, CTOBSSIM_VERSION)
73 73 *
74 74 * Constructs application by initialising from an observation container.
75 75 ***************************************************************************/
76   -ctobssim::ctobssim(GObservations obs) :
  76 +ctobssim::ctobssim(const GObservations& obs) :
77 77 GApplication(CTOBSSIM_NAME, CTOBSSIM_VERSION)
78 78 {
79 79 // Initialise members
... ...
src/ctobssim/ctobssim.hpp
... ... @@ -51,7 +51,7 @@ class ctobssim : public GApplication {
51 51 public:
52 52 // Constructors and destructors
53 53 ctobssim(void);
54   - explicit ctobssim(GObservations obs);
  54 + explicit ctobssim(const GObservations& obs);
55 55 ctobssim(int argc, char *argv[]);
56 56 ctobssim(const ctobssim& app);
57 57 virtual ~ctobssim(void);
... ...
src/ctselect/ctselect.cpp
... ... @@ -68,10 +68,13 @@ ctselect::ctselect(void) : GApplication(CTSELECT_NAME, CTSELECT_VERSION)
68 68 /***********************************************************************//**
69 69 * @brief Observations constructor
70 70 *
  71 + * param[in] obs Observation container.
  72 + *
71 73 * This constructor creates an instance of the class that is initialised from
72 74 * an observation container.
73 75 ***************************************************************************/
74   -ctselect::ctselect(GObservations obs) : GApplication(CTSELECT_NAME, CTSELECT_VERSION)
  76 +ctselect::ctselect(const GObservations& obs) :
  77 + GApplication(CTSELECT_NAME, CTSELECT_VERSION)
75 78 {
76 79 // Initialise members
77 80 init_members();
... ...
src/ctselect/ctselect.hpp
... ... @@ -47,7 +47,7 @@ class ctselect : public GApplication {
47 47 public:
48 48 // Constructors and destructors
49 49 ctselect(void);
50   - explicit ctselect(GObservations obs);
  50 + explicit ctselect(const GObservations& obs);
51 51 ctselect(int argc, char *argv[]);
52 52 ctselect(const ctselect& app);
53 53 virtual ~ctselect(void);
... ...
src/ctskymap/ctskymap.cpp
... ... @@ -66,10 +66,13 @@ ctskymap::ctskymap(void) : GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION)
66 66 /***********************************************************************//**
67 67 * @brief Observations constructor
68 68 *
  69 + * param[in] obs Observation container.
  70 + *
69 71 * This method creates an instance of the class by copying an existing
70 72 * observations container.
71 73 ***************************************************************************/
72   -ctskymap::ctskymap(GObservations obs) : GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION)
  74 +ctskymap::ctskymap(const GObservations& obs) :
  75 + GApplication(CTSKYMAP_NAME, CTSKYMAP_VERSION)
73 76 {
74 77 // Initialise members
75 78 init_members();
... ...
src/ctskymap/ctskymap.hpp
... ... @@ -47,7 +47,7 @@ class ctskymap : public GApplication {
47 47 public:
48 48 // Constructors and destructors
49 49 ctskymap(void);
50   - explicit ctskymap(GObservations obs);
  50 + explicit ctskymap(const GObservations& obs);
51 51 ctskymap(int argc, char *argv[]);
52 52 ctskymap(const ctskymap& app);
53 53 virtual ~ctskymap(void);
... ...
test/test_ctools.sh
... ... @@ -406,13 +406,15 @@ $ctpsfcube infile="data/crab_events.fits" \
406 406 emin=0.1 \
407 407 emax=100.0 \
408 408 enumbins=20 \
409   - nxpix=200 \
410   - nypix=200 \
411   - binsz=0.02 \
  409 + nxpix=10 \
  410 + nypix=10 \
  411 + binsz=0.4 \
412 412 coordsys="CEL" \
413 413 xref=83.63 \
414 414 yref=22.01 \
415   - proj="CAR"
  415 + proj="CAR" \
  416 + amax=0.3 \
  417 + anumbins=10
416 418 $ECHO -n "."
417 419 if [ -s "psfcube1.fits" ]
418 420 then
... ... @@ -427,7 +429,9 @@ $ctpsfcube infile="data/crab_events.fits" \
427 429 cntmap="data/crab_cntmap.fits" \
428 430 outfile="psfcube2.fits" \
429 431 caldb="irf" \
430   - irf="cta_dummy_irf"
  432 + irf="cta_dummy_irf" \
  433 + amax=0.3 \
  434 + anumbins=10
431 435 $ECHO -n "."
432 436 if [ -s "psfcube2.fits" ]
433 437 then
... ...