Commit f777479eb5dc033ad7f405acecf02e3e0d09085c

Authored by Jürgen Knödlseder
2 parents 7d91984f fb1fb026

Merge branch 'issue_1061_again' into integration

ChangeLog
1   -2013-12-13 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
  1 +2014-01-08 Juergen Knoedlseder <jurgen.knodlseder@irap.omp.eu>
2 2  
3 3 * Version 0.7.0 released
4 4 ========================
5 5  
6 6 Adapt to GammaLib-00-08-00 interface
7 7 ctobssim now only simulates events within ROI and supports
8   - all kinds of data space models
  8 + all kinds of data space models; time slice durations are
  9 + determined based on source flux
9 10 ctbin now implements LIN and FILE binning algorithms
10 11 ctbin, ctskymap and ctmodel now generate maps with
11 12 increasing longitude to the left
... ...
... ... @@ -2,7 +2,7 @@ New Features and Important Changes in ctools 00-07-00
2 2  
3 3 Author(s) : Juergen Knoedlseder
4 4  
5   -13 December 2013
  5 +8 January 2014
6 6  
7 7  
8 8 1. Introduction
... ... @@ -37,6 +37,11 @@ ctobssim now supports any kind of data space model for background
37 37 simulations, using the abstract mc() method that is now available
38 38 in the GModelData base class.
39 39  
  40 +The time slice duration is now computed from the source flux and
  41 +set so that no more than 1000000 photons will be simulated in a
  42 +given slice. This limits the memory requirements during simulations
  43 +to about 100 MB, yet saving may still need more memory.
  44 +
40 45  
41 46 5. ctselect - CTA event selection
42 47 ---------------------------------
... ...
scripts/cspull.py
... ... @@ -87,28 +87,28 @@ class cspull(GApplication):
87 87 parfile = self.name+".par"
88 88  
89 89 try:
90   - pars = GPars(parfile)
  90 + pars = GApplicationPars(parfile)
91 91 except:
92 92 # Signal if parfile was not found
93 93 sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n")
94 94  
95 95 # Create default parfile
96   - pars = GPars()
97   - pars.append(GPar("srcmdl","f","a","$GAMMALIB/share/models/crab.xml","","","Source model"))
98   - pars.append(GPar("outfile","f","a","pull.dat","","","Output file name"))
99   - pars.append(GPar("ntrials","i","a","10","","","Number of trials"))
100   - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
101   - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
102   - pars.append(GPar("ra","r","a","83.6331","0","360","RA of pointing (deg)"))
103   - pars.append(GPar("dec","r","a","22.0145","-90","90","Dec of pointing (deg)"))
104   - pars.append(GPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)"))
105   - pars.append(GPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)"))
106   - pars.append(GPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)"))
107   - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
108   - pars.append(GPar("deadc","r","h","0.95","","","Deadtime correction factor"))
109   - pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)"))
110   - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned"))
111   - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
  96 + pars = GApplicationPars()
  97 + pars.append(GApplicationPar("srcmdl","f","a","$GAMMALIB/share/models/crab.xml","","","Source model"))
  98 + pars.append(GApplicationPar("outfile","f","a","pull.dat","","","Output file name"))
  99 + pars.append(GApplicationPar("ntrials","i","a","10","","","Number of trials"))
  100 + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
  101 + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
  102 + pars.append(GApplicationPar("ra","r","a","83.6331","0","360","RA of pointing (deg)"))
  103 + pars.append(GApplicationPar("dec","r","a","22.0145","-90","90","Dec of pointing (deg)"))
  104 + pars.append(GApplicationPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)"))
  105 + pars.append(GApplicationPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)"))
  106 + pars.append(GApplicationPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)"))
  107 + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
  108 + pars.append(GApplicationPar("deadc","r","h","0.95","","","Deadtime correction factor"))
  109 + pars.append(GApplicationPar("rad","r","h","5.0","","","Radius of ROI (deg)"))
  110 + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned"))
  111 + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
112 112 pars.append_standard()
113 113 pars.save(parfile)
114 114  
... ...
scripts/cssens.py
... ... @@ -98,31 +98,31 @@ class cssens(GApplication):
98 98 parfile = self.name+".par"
99 99  
100 100 try:
101   - pars = GPars(parfile)
  101 + pars = GApplicationPars(parfile)
102 102 except:
103 103 # Signal if parfile was not found
104 104 sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n")
105 105  
106 106 # Create default parfile
107   - pars = GPars()
108   - pars.append(GPar("outfile","f","h","sensitivity.dat","","","Output file name"))
109   - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
110   - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
111   - pars.append(GPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)"))
112   - pars.append(GPar("offset","r","a","0.0","0.0","","Source offset angle (deg)"))
113   - pars.append(GPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)"))
114   - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
115   - pars.append(GPar("rad","r","a","5.0","","","Radius of ROI (deg)"))
116   - pars.append(GPar("enumbins","i","h","0","","","Number of energy bins (0=unbinned)"))
117   - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned"))
118   - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
119   - pars.append(GPar("sigma","r","h","5.0","","","Significance threshold"))
120   - pars.append(GPar("ts_use","b","h","yes","","","Use TS?"))
121   - pars.append(GPar("index","r","h","-2.48","","","Assumed spectral index"))
122   - pars.append(GPar("radius","r","h","0.1","","","Extended source model radius"))
123   - pars.append(GPar("width","r","h","0.05","","","Extended source model width"))
124   - pars.append(GPar("max_iter","i","h","50","","","Maximum number of iterations"))
125   - pars.append(GPar("num_avg","i","h","3","","","Number of iterations for sliding average"))
  107 + pars = GApplicationPars()
  108 + pars.append(GApplicationPar("outfile","f","h","sensitivity.dat","","","Output file name"))
  109 + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
  110 + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
  111 + pars.append(GApplicationPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)"))
  112 + pars.append(GApplicationPar("offset","r","a","0.0","0.0","","Source offset angle (deg)"))
  113 + pars.append(GApplicationPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)"))
  114 + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
  115 + pars.append(GApplicationPar("rad","r","a","5.0","","","Radius of ROI (deg)"))
  116 + pars.append(GApplicationPar("enumbins","i","h","0","","","Number of energy bins (0=unbinned)"))
  117 + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned"))
  118 + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
  119 + pars.append(GApplicationPar("sigma","r","h","5.0","","","Significance threshold"))
  120 + pars.append(GApplicationPar("ts_use","b","h","yes","","","Use TS?"))
  121 + pars.append(GApplicationPar("index","r","h","-2.48","","","Assumed spectral index"))
  122 + pars.append(GApplicationPar("radius","r","h","0.1","","","Extended source model radius"))
  123 + pars.append(GApplicationPar("width","r","h","0.05","","","Extended source model width"))
  124 + pars.append(GApplicationPar("max_iter","i","h","50","","","Maximum number of iterations"))
  125 + pars.append(GApplicationPar("num_avg","i","h","3","","","Number of iterations for sliding average"))
126 126 pars.append_standard()
127 127 pars.save(parfile)
128 128  
... ...
scripts/cstsdist.py
... ... @@ -88,28 +88,28 @@ class cstsdist(GApplication):
88 88 parfile = self.name+".par"
89 89  
90 90 try:
91   - pars = GPars(parfile)
  91 + pars = GApplicationPars(parfile)
92 92 except:
93 93 # Signal if parfile was not found
94 94 sys.stdout.write("Parfile "+parfile+" not found. Create default parfile.\n")
95 95  
96 96 # Create default parfile
97   - pars = GPars()
98   - pars.append(GPar("outfile","f","h","ts.dat","","","Output file name"))
99   - pars.append(GPar("ntrials","i","a","10","","","Number of trials"))
100   - pars.append(GPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
101   - pars.append(GPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
102   - pars.append(GPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)"))
103   - pars.append(GPar("index","r","h","-2.48","","","Spectral index"))
104   - pars.append(GPar("offset","r","a","0.0","0.0","","Source offset angle (deg)"))
105   - pars.append(GPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)"))
106   - pars.append(GPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)"))
107   - pars.append(GPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)"))
108   - pars.append(GPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)"))
109   - pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
110   - pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)"))
111   - pars.append(GPar("npix","i","h","200","","","Number of pixels for binned"))
112   - pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
  97 + pars = GApplicationPars()
  98 + pars.append(GApplicationPar("outfile","f","h","ts.dat","","","Output file name"))
  99 + pars.append(GApplicationPar("ntrials","i","a","10","","","Number of trials"))
  100 + pars.append(GApplicationPar("caldb","s","a","$GAMMALIB/share/caldb/cta","","","Calibration database"))
  101 + pars.append(GApplicationPar("irf","s","a","cta_dummy_irf","","","Instrument response function"))
  102 + pars.append(GApplicationPar("type","s","a","point","","","Source model type (point/gauss/shell/disk)"))
  103 + pars.append(GApplicationPar("index","r","h","-2.48","","","Spectral index"))
  104 + pars.append(GApplicationPar("offset","r","a","0.0","0.0","","Source offset angle (deg)"))
  105 + pars.append(GApplicationPar("bkg","s","a","$GAMMALIB/share/models/bkg_dummy.txt","","","Background model file function (none=power law for E)"))
  106 + pars.append(GApplicationPar("emin","r","a","0.1","0.0","","Lower energy limit (TeV)"))
  107 + pars.append(GApplicationPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)"))
  108 + pars.append(GApplicationPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)"))
  109 + pars.append(GApplicationPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
  110 + pars.append(GApplicationPar("rad","r","h","5.0","","","Radius of ROI (deg)"))
  111 + pars.append(GApplicationPar("npix","i","h","200","","","Number of pixels for binned"))
  112 + pars.append(GApplicationPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)"))
113 113 pars.append_standard()
114 114 pars.save(parfile)
115 115  
... ...