diff --git a/doc/source/users/reference_manual/ctselect.rst b/doc/source/users/reference_manual/ctselect.rst index 34f6fb8..84ec751 100644 --- a/doc/source/users/reference_manual/ctselect.rst +++ b/doc/source/users/reference_manual/ctselect.rst @@ -85,13 +85,12 @@ General parameters If INDEF, NONE, UNDEF or UNDEFINED is passed as value, no energy selection will be performed. -``(phasemin = 0.0) [real]`` - Lower phase limit of events. - If INDEF, NONE, UNDEF or UNDEFINED is passed as value, no phase - selection will be performed. - -``(phasemax = 1.0) [real]`` - Upper phase limit of events. +``(phase = NONE) [string]`` + String to apply a phase selection. The string must contain the boundaries + of the phase interval to be selected separated be a colon. More than one + interval can be specified at the same time. In this case intervals must be + separated by a comma. Examples of valid strings are: phase = "0.3:0.6" or + phase = "0.3:0.6,0.8:0.9". If INDEF, NONE, UNDEF or UNDEFINED is passed as value, no phase selection will be performed. diff --git a/test/test_ctselect.py b/test/test_ctselect.py index 7b135c3..480ecaa 100755 --- a/test/test_ctselect.py +++ b/test/test_ctselect.py @@ -357,6 +357,28 @@ class Test(test): # Check result file self._check_result_file('ctselect_py10.fits', nevents=0, dec=-22.01, rad=5.0) + # Now test phase cut + select = ctools.ctselect() + select['inobs'] = os.path.dirname(self._events)+"/phased_"+os.path.basename(self._events) + select['ra'] = 83.63 + select['dec'] = 22.01 + select['rad'] = 5. + select['tmin'] = "INDEF" + select['tmax'] = "INDEF" + select['emin'] = 0.1 + select['emax'] = 100.0 + select['phase'] = "0.1:0.4,0.6:0.8" + select['outobs'] = 'ctselect_py11.fits' + select['logfile'] = 'ctselect_py11.log' + select['chatter'] = 2 + + # Run ctselect tool + select.logFileOpen() # Make sure we get a log file + select.execute() + + # Check result file + self._check_result_file('ctselect_py11.fits', nevents=3159, dec=22.01, rad=5.) + # Return return