Commit d3fa9b00da7aa282bd2c1201008df877788d0edf
1 parent
907c41e8
Add deadc parameter, and set the default deadtime correction factor to 0.95.
Showing
1 changed file
with
5 additions
and
3 deletions
scripts/cspull.py
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | # ========================================================================== |
| 3 | 3 | # This script generates the pull distribution for all model parameters. |
| 4 | 4 | # |
| 5 | -# Copyright (C) 2011 Jurgen Knodlseder | |
| 5 | +# Copyright (C) 2011-2012 Juergen Knoedlseder | |
| 6 | 6 | # |
| 7 | 7 | # This program is free software: you can redistribute it and/or modify |
| 8 | 8 | # it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -42,7 +42,7 @@ class cspull(GApplication): |
| 42 | 42 | """ |
| 43 | 43 | # Set name |
| 44 | 44 | self.name = "cspull" |
| 45 | - self.version = "0.1.0" | |
| 45 | + self.version = "0.2.0" | |
| 46 | 46 | |
| 47 | 47 | # Initialise some members |
| 48 | 48 | self.obs = None |
| ... | ... | @@ -105,6 +105,7 @@ class cspull(GApplication): |
| 105 | 105 | pars.append(GPar("emax","r","a","100.0","0.0","","Upper energy limit (TeV)")) |
| 106 | 106 | pars.append(GPar("enumbins","i","a","0","","","Number of energy bins (0=unbinned)")) |
| 107 | 107 | pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) |
| 108 | + pars.append(GPar("deadc","r","a","0.95","","","Deadtime correction factor")) | |
| 108 | 109 | pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)")) |
| 109 | 110 | pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) |
| 110 | 111 | pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) |
| ... | ... | @@ -131,6 +132,7 @@ class cspull(GApplication): |
| 131 | 132 | self.m_emax = self["emax"].real() |
| 132 | 133 | self.m_enumbins = self["enumbins"].integer() |
| 133 | 134 | self.m_duration = self["duration"].real() |
| 135 | + self.m_deadc = self["deadc"].real() | |
| 134 | 136 | self.m_rad = self["rad"].real() |
| 135 | 137 | self.m_npix = self["npix"].integer() |
| 136 | 138 | self.m_binsz = self["binsz"].real() |
| ... | ... | @@ -240,7 +242,7 @@ class cspull(GApplication): |
| 240 | 242 | |
| 241 | 243 | # Create CTA observation |
| 242 | 244 | run = obsutils.set(pntdir, caldb=self.m_caldb, irf=self.m_irf, \ |
| 243 | - duration=self.m_duration, \ | |
| 245 | + duration=self.m_duration, deadc=self.m_deadc, \ | |
| 244 | 246 | emin=emin, emax=emax, rad=self.m_rad) |
| 245 | 247 | |
| 246 | 248 | # Append observation to container | ... | ... |