Commit 07c969314589afa3b127f4f1298f9f0cee469aa9
1 parent
c775ed44
rename to cssens.py
Showing
1 changed file
with
6 additions
and
1 deletions
scripts/cssens renamed to scripts/cssens.py
| ... | ... | @@ -119,7 +119,9 @@ class cssens(GApplication): |
| 119 | 119 | pars.append(GPar("irf","s","a","kb_E_50h_v3","","","Instrument response function")) |
| 120 | 120 | pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) |
| 121 | 121 | pars.append(GPar("rad","r","a","5.0","","","Radius of ROI (deg)")) |
| 122 | - pars.append(GPar("enumbins","i","h","0","","","Number of energy bins")) | |
| 122 | + pars.append(GPar("enumbins","i","h","0","","","Number of energy bins (0=unbinned)")) | |
| 123 | + pars.append(GPar("npix","i","h","200","","","Number of pixels for binned")) | |
| 124 | + pars.append(GPar("binsz","r","h","0.05","","","Pixel size for binned (deg/pixel)")) | |
| 123 | 125 | pars.append(GPar("sigma","r","h","5.0","","","Significance threshold")) |
| 124 | 126 | pars.append(GPar("ts_use","b","h","no","","","Use TS instead of Sigma?")) |
| 125 | 127 | pars.append(GPar("index","r","h","-2.48","","","Assumed spectral index")) |
| ... | ... | @@ -142,6 +144,8 @@ class cssens(GApplication): |
| 142 | 144 | self.m_duration = self["duration"].real() |
| 143 | 145 | self.m_roi = self["rad"].real() |
| 144 | 146 | self.m_nbins = self["enumbins"].integer() |
| 147 | + self.m_npix = self["npix"].integer() | |
| 148 | + self.m_binsz = self["binsz"].real() | |
| 145 | 149 | self.m_ts_thres = self["sigma"].real()*self["sigma"].real() |
| 146 | 150 | self.m_use_ts = self["ts_use"].boolean() |
| 147 | 151 | self.m_index = self["index"].real() |
| ... | ... | @@ -417,6 +421,7 @@ class cssens(GApplication): |
| 417 | 421 | |
| 418 | 422 | # Simulate events |
| 419 | 423 | sim = obsutils.sim(obs, nbins=self.m_nbins, seed=iter, \ |
| 424 | + binsz=self.m_binsz, npix=self.m_npix, \ | |
| 420 | 425 | log=self.m_log, debug=self.m_debug) |
| 421 | 426 | |
| 422 | 427 | # Determine number of events in simulation | ... | ... |