Commit 07c969314589afa3b127f4f1298f9f0cee469aa9

Authored by knodlseder
1 parent c775ed44

rename to cssens.py

scripts/cssens renamed to scripts/cssens.py
@@ -119,7 +119,9 @@ class cssens(GApplication): @@ -119,7 +119,9 @@ class cssens(GApplication):
119 pars.append(GPar("irf","s","a","kb_E_50h_v3","","","Instrument response function")) 119 pars.append(GPar("irf","s","a","kb_E_50h_v3","","","Instrument response function"))
120 pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)")) 120 pars.append(GPar("duration","r","a","180000.0","","","Effective exposure time (s)"))
121 pars.append(GPar("rad","r","a","5.0","","","Radius of ROI (deg)")) 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 pars.append(GPar("sigma","r","h","5.0","","","Significance threshold")) 125 pars.append(GPar("sigma","r","h","5.0","","","Significance threshold"))
124 pars.append(GPar("ts_use","b","h","no","","","Use TS instead of Sigma?")) 126 pars.append(GPar("ts_use","b","h","no","","","Use TS instead of Sigma?"))
125 pars.append(GPar("index","r","h","-2.48","","","Assumed spectral index")) 127 pars.append(GPar("index","r","h","-2.48","","","Assumed spectral index"))
@@ -142,6 +144,8 @@ class cssens(GApplication): @@ -142,6 +144,8 @@ class cssens(GApplication):
142 self.m_duration = self["duration"].real() 144 self.m_duration = self["duration"].real()
143 self.m_roi = self["rad"].real() 145 self.m_roi = self["rad"].real()
144 self.m_nbins = self["enumbins"].integer() 146 self.m_nbins = self["enumbins"].integer()
  147 + self.m_npix = self["npix"].integer()
  148 + self.m_binsz = self["binsz"].real()
145 self.m_ts_thres = self["sigma"].real()*self["sigma"].real() 149 self.m_ts_thres = self["sigma"].real()*self["sigma"].real()
146 self.m_use_ts = self["ts_use"].boolean() 150 self.m_use_ts = self["ts_use"].boolean()
147 self.m_index = self["index"].real() 151 self.m_index = self["index"].real()
@@ -417,6 +421,7 @@ class cssens(GApplication): @@ -417,6 +421,7 @@ class cssens(GApplication):
417 421
418 # Simulate events 422 # Simulate events
419 sim = obsutils.sim(obs, nbins=self.m_nbins, seed=iter, \ 423 sim = obsutils.sim(obs, nbins=self.m_nbins, seed=iter, \
  424 + binsz=self.m_binsz, npix=self.m_npix, \
420 log=self.m_log, debug=self.m_debug) 425 log=self.m_log, debug=self.m_debug)
421 426
422 # Determine number of events in simulation 427 # Determine number of events in simulation