Commit 2aab75b7eb29fb76673e5416ed961bcfad545238

Authored by Luigi Tibaldo
1 parent ffcaa39f

debugged parameter query for On/Off

cscripts/obsutils.py
... ... @@ -785,7 +785,7 @@ def get_onoff_obs(cls, obs):
785 785 cls._log.header3('Creating On/Off observations')
786 786  
787 787 phagen = cscripts.csphagen(obs)
788   - phagen['inexclusion'] = cls['inexclusion'].filename()
  788 + phagen['inexclusion'] = cls['inexclusion'].value()
789 789 phagen['emin'] = cls['emin'].real()
790 790 phagen['emax'] = cls['emax'].real()
791 791 phagen['enumbins'] = cls['enumbins'].integer()
... ... @@ -802,11 +802,11 @@ def get_onoff_obs(cls, obs):
802 802 phagen['rad'] = cls['rad'].real()
803 803 bkgmethod = cls['bkgmethod'].string()
804 804 if bkgmethod == 'REFLECTED':
805   - phagen['bkgregmin'] = cls['bkgregmin'].string()
806   - phagen['maxoffset'] = cls['maxoffset'].string()
  805 + phagen['bkgregmin'] = cls['bkgregmin'].integer()
  806 + phagen['maxoffset'] = cls['maxoffset'].real()
807 807 phagen['stack'] = True
808   - phagen['emintrue'] = cls['emintrue'].real()
809   - phagen['emaxtrue'] = cls['emaxtrue'].real()
  808 + phagen['etruemin'] = cls['etruemin'].real()
  809 + phagen['etruemax'] = cls['etruemax'].real()
810 810 phagen['etruebins'] = cls['etruebins'].integer()
811 811 phagen.run()
812 812  
... ...
src/support/ctool.cpp
... ... @@ -1230,11 +1230,11 @@ bool ctool::is_onoff(void)
1230 1230 }
1231 1231 (*this)["maxoffset"].real();
1232 1232 (*this)["etruemin"].real();
1233   - (*this)["etruemx"].real();
  1233 + (*this)["etruemax"].real();
1234 1234 (*this)["etruebins"].integer();
1235 1235 }
1236 1236  
1237   - // Return stacked flag
  1237 + // Return onoff flag
1238 1238 return onoff;
1239 1239 }
1240 1240  
... ...