diff --git a/cscripts/cspull.par b/cscripts/cspull.par index 2ad62cb..6059c2a 100644 --- a/cscripts/cspull.par +++ b/cscripts/cspull.par @@ -30,6 +30,7 @@ outfile, f, a, pull.dat,,, "Output pull distribution file" ntrials, i, a, 10,,, "Number of trials" ra, r, a, 83.6331,0,360, "RA of pointing (degrees)" dec, r, a, 22.0145,-90,90, "Dec of pointing (degrees)" +rad, r, h, 5.0,0,180, "Radius of ROI (degrees)" coordsys, s, a, CEL,CEL|GAL,, "Coordinate system (CEL - celestial, GAL - galactic)" proj, s, a, TAN,AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN,, "Projection method" emin, r, a, 0.1,,, "Lower energy limit (TeV)" @@ -39,13 +40,9 @@ tmin, t, a, 2020-01-01T00:00:00,,, "Start time (UTC string, JD, MJD or MET i tmax, t, a, 2020-01-01T00:30:00,,, "Stop time (UTC string, JD, MJD or MET in seconds)" npix, i, a, 200,,, "Number of pixels for binned" binsz, r, a, 0.05,,, "Pixel size for binned (degrees/pixel)" -rad, r, h, 5.0,0,180, "Radius of ROI (degrees)" -pattern, s, h, single,single|four,, "Observation pattern" -offset, r, h, 1.5,,, "Observation pattern offset (degrees)" profile, b, h, no,,, "Use likelihood profile method for errors?" seed, i, h, 1,,, "Initial random number generator seed" - # # Standard parameters #==================== diff --git a/cscripts/cspull.py b/cscripts/cspull.py index 331cf15..14072b5 100755 --- a/cscripts/cspull.py +++ b/cscripts/cspull.py @@ -47,7 +47,6 @@ class cspull(ctools.cscript): self._coordsys = 'CEL' self._proj = 'TAN' self._log_clients = False # Static parameter - self._offset = 0.0 self._ntrials = 0 self._npix = 0 self._binsz = 0.0 @@ -74,17 +73,6 @@ class cspull(ctools.cscript): if self._obs.size() == 0: self._obs = self._get_observations() - # Check for requested pattern and set wobble pattern - if self['pattern'].string() == 'four': - tmin = self['tmin'].time(self._time_reference()).secs() - duration = self['tmax'].time(self._time_reference()).secs() - tmin - self._obs = obsutils.set_observations(self['ra'].real(), self['dec'].real(), self['rad'].real(), - tmin, duration, - self['emin'].real(), self['emax'].real(), - self['irf'].string(), self['caldb'].string(), - deadc=self['deadc'].real(), - pattern=self['pattern'].string(), offset=self['offset'].real()) - # ... otherwise add response information and energy boundaries # in case they are missing else: @@ -107,7 +95,6 @@ class cspull(ctools.cscript): # Read other parameters self._ntrials = self['ntrials'].integer() self._edisp = self['edisp'].boolean() - self._offset = self['offset'].real() self._seed = self['seed'].integer() self._chatter = self['chatter'].integer() diff --git a/cscripts/cstsdist.par b/cscripts/cstsdist.par index de339e7..9f45e57 100644 --- a/cscripts/cstsdist.par +++ b/cscripts/cstsdist.par @@ -35,6 +35,7 @@ outfile, f, a, ts.dat,,, "Output Test Statistic distribution file" ntrials, i, a, 10,,, "Number of trials" ra, r, a, 83.63,0,360, "RA of pointing (degrees)" dec, r, a, 22.01,-90,90, "Dec of pointing (degrees)" +rad, r, h, 5.0,0,180, "Radius of ROI (degrees)" coordsys, s, a, CEL,CEL|GAL,, "Coordinate system (CEL - celestial, GAL - galactic)" proj, s, a, TAN,AIT|AZP|CAR|GLS|MER|MOL|SFL|SIN|STG|TAN,, "Projection method" emin, r, a, 0.1,,, "Lower energy limit (TeV)" @@ -44,9 +45,6 @@ tmin, t, a, 2020-01-01T00:00:00,,, "Start time (UTC string, JD, MJD or MET i tmax, t, a, 2020-01-01T00:30:00,,, "Stop time (UTC string, JD, MJD or MET in seconds)" npix, i, a, 200,,, "Number of pixels for binned" binsz, r, a, 0.05,,, "Pixel size for binned (degrees/pixel)" -rad, r, h, 5.0,0,180, "Radius of ROI (degrees)" -pattern, s, h, single,single|four,, "Observation pattern" -offset, r, h, 1.5,,, "Observation pattern offset (degrees)" # # Standard parameters diff --git a/cscripts/cstsdist.py b/cscripts/cstsdist.py index c1c4dde..6657c72 100755 --- a/cscripts/cstsdist.py +++ b/cscripts/cstsdist.py @@ -66,17 +66,6 @@ class cstsdist(ctools.cscript): if self._obs.size() == 0: self._obs = self._get_observations() - # Check for requested pattern and set wobble pattern - if self['pattern'].string() == 'four': - tmin = self['tmin'].time(self._time_reference()).secs() - duration = self['tmax'].time(self._time_reference()).secs() - tmin - self._obs = obsutils.set_observations(self['ra'].real(), self['dec'].real(), self['rad'].real(), - tmin, duration, - self['emin'].real(), self['emax'].real(), - self['irf'].string(), self['caldb'].string(), - deadc=self['deadc'].real(), - pattern=self['pattern'].string(), offset=self['offset'].real()) - # Get source name self._srcname = self['srcname'].string() diff --git a/doc/source/users/reference_manual/cspull.rst b/doc/source/users/reference_manual/cspull.rst index 7974558..5a4737c 100644 --- a/doc/source/users/reference_manual/cspull.rst +++ b/doc/source/users/reference_manual/cspull.rst @@ -50,7 +50,7 @@ General parameters ``irf [string]`` Instrumental response function. -``(deadc = 0.95) [real]`` +``(deadc = 0.98) [real]`` Average deadtime correction factor. ``(edisp = no) [boolean]`` @@ -68,6 +68,9 @@ General parameters ``dec [real]`` Declination of CTA pointing (J2000, in degrees). +``(rad = 5.0) [real]`` + ROI radius (in degrees). + ``coordsys [string]`` Coordinate system (CEL - celestial, GAL - galactic). @@ -95,15 +98,6 @@ General parameters ``binsz [real]`` Pixel size for binned analysis. -``(rad = 5.0) [real]`` - ROI radius (in degrees). - -``(pattern = single) [string]`` - Pattern for pointing simulation (single/four). - -``(offset = 1.5) [real]`` - Observation pattern offset (in degrees). - Standard parameters ------------------- diff --git a/doc/source/users/reference_manual/cstsdist.rst b/doc/source/users/reference_manual/cstsdist.rst index 24767b8..a6d4155 100644 --- a/doc/source/users/reference_manual/cstsdist.rst +++ b/doc/source/users/reference_manual/cstsdist.rst @@ -63,7 +63,7 @@ General parameters ``irf [string]`` Instrumental response function. -``(deadc = 0.95) [real]`` +``(deadc = 0.98) [real]`` Average deadtime correction factor. ``(edisp = no) [boolean]`` @@ -78,6 +78,9 @@ General parameters ``dec [real]`` Declination of CTA pointing (J2000, in degrees). +``(rad = 5.0) [real]`` + ROI radius (in degrees). + ``coordsys [string]`` Coordinate system (CEL - celestial, GAL - galactic). @@ -105,15 +108,6 @@ General parameters ``binsz [real]`` Pixel size for binned analysis. -``(rad = 5.0) [real]`` - Radius of ROI (in degrees). - -``(pattern = single) [string]`` - Pattern for pointing simulation (single/four). - -``(offset = 1.5) [real]`` - Observation pattern offset (in degrees). - Standard parameters ------------------- diff --git a/test/test_cstsdist.py b/test/test_cstsdist.py index a564cc6..e776369 100755 --- a/test/test_cstsdist.py +++ b/test/test_cstsdist.py @@ -138,36 +138,6 @@ class Test(test): # Check pull distribution file self._check_result_file('cstsdist_py1.dat') - # Set-up binned cstsdist in four observation wobble mode - tsdist = cscripts.cstsdist() - tsdist['inmodel'] = self._model - tsdist['srcname'] = 'Crab' - tsdist['caldb'] = self._caldb - tsdist['irf'] = self._irf - tsdist['ntrials'] = 1 - tsdist['ra'] = 83.63 - tsdist['dec'] = 22.01 - tsdist['coordsys'] = 'CEL' - tsdist['proj'] = 'TAN' - tsdist['emin'] = 0.1 - tsdist['emax'] = 100.0 - tsdist['enumbins'] = 10 - tsdist['tmin'] = 0.0 - tsdist['tmax'] = 1800.0 - tsdist['rad'] = 5.0 - tsdist['npix'] = 50 - tsdist['binsz'] = 0.1 - tsdist['pattern'] = 'four' - tsdist['outfile'] = 'cstsdist_py2.dat' - tsdist['logfile'] = 'cstsdist_py2.log' - tsdist['chatter'] = 4 - - # Execute cstsdist script - tsdist.execute() - - # Check pull distribution file - self._check_result_file('cstsdist_py2.dat', ncols=9) - # Return return