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,7 +2,7 @@ | ||
| 2 | # ========================================================================== | 2 | # ========================================================================== |
| 3 | # This script generates the pull distribution for all model parameters. | 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 | # This program is free software: you can redistribute it and/or modify | 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 | 8 | # it under the terms of the GNU General Public License as published by |
| @@ -42,7 +42,7 @@ class cspull(GApplication): | @@ -42,7 +42,7 @@ class cspull(GApplication): | ||
| 42 | """ | 42 | """ |
| 43 | # Set name | 43 | # Set name |
| 44 | self.name = "cspull" | 44 | self.name = "cspull" |
| 45 | - self.version = "0.1.0" | 45 | + self.version = "0.2.0" |
| 46 | 46 | ||
| 47 | # Initialise some members | 47 | # Initialise some members |
| 48 | self.obs = None | 48 | self.obs = None |
| @@ -105,6 +105,7 @@ class cspull(GApplication): | @@ -105,6 +105,7 @@ class cspull(GApplication): | ||
| 105 | pars.append(GPar("emax","r","a","100.0","0.0","","Upper 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)")) | 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)")) | 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 | pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)")) | 109 | pars.append(GPar("rad","r","h","5.0","","","Radius of ROI (deg)")) |
| 109 | pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) | 110 | pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) |
| 110 | pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | 111 | pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) |
| @@ -131,6 +132,7 @@ class cspull(GApplication): | @@ -131,6 +132,7 @@ class cspull(GApplication): | ||
| 131 | self.m_emax = self["emax"].real() | 132 | self.m_emax = self["emax"].real() |
| 132 | self.m_enumbins = self["enumbins"].integer() | 133 | self.m_enumbins = self["enumbins"].integer() |
| 133 | self.m_duration = self["duration"].real() | 134 | self.m_duration = self["duration"].real() |
| 135 | + self.m_deadc = self["deadc"].real() | ||
| 134 | self.m_rad = self["rad"].real() | 136 | self.m_rad = self["rad"].real() |
| 135 | self.m_npix = self["npix"].integer() | 137 | self.m_npix = self["npix"].integer() |
| 136 | self.m_binsz = self["binsz"].real() | 138 | self.m_binsz = self["binsz"].real() |
| @@ -240,7 +242,7 @@ class cspull(GApplication): | @@ -240,7 +242,7 @@ class cspull(GApplication): | ||
| 240 | 242 | ||
| 241 | # Create CTA observation | 243 | # Create CTA observation |
| 242 | run = obsutils.set(pntdir, caldb=self.m_caldb, irf=self.m_irf, \ | 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 | emin=emin, emax=emax, rad=self.m_rad) | 246 | emin=emin, emax=emax, rad=self.m_rad) |
| 245 | 247 | ||
| 246 | # Append observation to container | 248 | # Append observation to container |