Commit 6c97c6e050dae84de7ff768dad6991daa2d15240

Authored by Jürgen Knödlseder
1 parent 0c9f1f2a

Correct division bug in cslightcrv (result was float, needs int).

cscripts/cslightcrv.par
@@ -33,7 +33,7 @@ outfile, f, a, lightcurve.fits,,, "Output light curve file" @@ -33,7 +33,7 @@ outfile, f, a, lightcurve.fits,,, "Output light curve file"
33 # Script parameters 33 # Script parameters
34 #================== 34 #==================
35 tbinalg, s, a, GTI,FILE|LIN|GTI,, "Algorithm for defining time bins" 35 tbinalg, s, a, GTI,FILE|LIN|GTI,, "Algorithm for defining time bins"
36 -tmin, r, a, 51544.5,,,"Lightcurve start time (MJD])" 36 +tmin, r, a, 51544.5,,,"Lightcurve start time (MJD)"
37 tmax, r, a, 51544.6,,,"Lightcurve stop time (MJD)" 37 tmax, r, a, 51544.6,,,"Lightcurve stop time (MJD)"
38 tbins, i, a, 5,1,10000, "Number of time bins" 38 tbins, i, a, 5,1,10000, "Number of time bins"
39 tbinfile, f, a, NONE,,, "File defining the time binning" 39 tbinfile, f, a, NONE,,, "File defining the time binning"
cscripts/cslightcrv.py
@@ -439,9 +439,9 @@ class cslightcrv(ctools.cscript): @@ -439,9 +439,9 @@ class cslightcrv(ctools.cscript):
439 439
440 # Compute spatial binning for point spread function and 440 # Compute spatial binning for point spread function and
441 # energy dispersion cubes 441 # energy dispersion cubes
442 - binsz = 0.1 * self["binsz"].real()  
443 - nxpix = self["nxpix"].integer() / 10  
444 - nypix = self["nypix"].integer() / 10 442 + binsz = 10.0 * self["binsz"].real()
  443 + nxpix = self["nxpix"].integer() // 10 # Make sure result is int
  444 + nypix = self["nypix"].integer() // 10 # Make sure result is int
445 if nxpix < 2: 445 if nxpix < 2:
446 nxpix = 2 446 nxpix = 2
447 if nypix < 2: 447 if nypix < 2: