diff --git a/doc/source/users/tutorials/1dc/scope.rst b/doc/source/users/tutorials/1dc/scope.rst index beba0a6..2e558fc 100644 --- a/doc/source/users/tutorials/1dc/scope.rst +++ b/doc/source/users/tutorials/1dc/scope.rst @@ -3,13 +3,23 @@ Scope of the First CTA Data Challenge ===================================== -The primary goal of the +The goal of the :ref:`First CTA Data Challenge ` -is to make the members of the CTA Consortium Science Working Groups familiar -with the CTA data format and tools and to stimulate the simulation and -benchmarking activities in the groups. -A secondary goal is to test CTA Science Analysis tools and to provide User -feedback to the code developers. +is to enable the CTA Consortium Science Working Groups to derive science +benchmarks for the CTA Key Science objectives. +The +:ref:`First CTA Data Challenge ` +should provide quantitative estimates of CTA's science capabilities that +will enable the CTA Consortium Science Working Groups to evaluate science +trade offs in the future. +The +:ref:`First CTA Data Challenge ` +should also result in numerous show cases, including for example images, +spectra and light curves, that can be used to illustrate CTA's science case, +and that should enrich the CTA outreach material. +Last but not least, the +:ref:`First CTA Data Challenge ` +should also stimulate the enrichment of the CTA Science Case. The data distributed in the :ref:`First CTA Data Challenge ` @@ -23,15 +33,16 @@ The have been simulated from high-level :ref:`Instrument Response Functions ` that correspond to an ideal CTA with good and stable atmosphere and instrument -conditions; only zenith angles of 20 degrees and 40 degrees **(TBC)** have been +conditions; only zenith angles of 20 degrees and 40 degrees have been simulated. Data are provided for the Baseline arrays and the Threshold Implementation. -Two Key Science Projects (KSPs) have been simulated using realistic pointing +Three Key Science Projects (KSPs) have been simulated using realistic pointing patterns: * the Galactic Plane Scan (GPS) +* the Galactic Centre Survey (GC) * the extragalactic survey The source model used for the simulations is distributed together with the diff --git a/examples/make_pointings.py b/examples/make_pointings.py index 7fbb8e4..ab09df0 100755 --- a/examples/make_pointings.py +++ b/examples/make_pointings.py @@ -100,7 +100,7 @@ def get_positions(xmin, xmax, ymin, ymax, step): # Setup patch on the sky # # ====================== # def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, - separation=3.0, hours=100.0, + separation=3.0, hours=100.0, run_duration=30.0, site=None, caldb='prod2', lst=True, autodec=0.0): """ Setup pointing patch on the sky @@ -118,7 +118,9 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, separation : float, optional Pointing separation (deg) hours : float, optional - Total observation duration (h) + Total observation duration (hours) + run_duration : float, optional + Run duration (min) site : str, optional Array site (one of 'Automatic', 'South', 'North') lst : bool, optional @@ -148,43 +150,56 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, # Set observations for pnt in pointings: - # Set positions and duration - obs = {'lon': pnt['x'], 'lat': pnt['y'], 'duration': duration} - - # Optionally add-in site dependent IRF - if site != None: - - # If automatic site switching is requested then set the North - # IRF for declinations greater or equal than "autodec" and the - # South IRF for declination smaller than "autodec". - if site == 'Automatic': - pos = gammalib.GSkyDir() - pos.lb_deg(pnt['x'], pnt['y']) - dec = pos.dec_deg() - if (dec >= autodec): - obs_site = 'North' + # Compute number of runs for this pointing + if run_duration > 0.0: + n_runs = int(duration / (run_duration*60.0) + 0.5) + exposure = run_duration*60.0 + if n_runs < 1: + n_runs = 1 + else: + n_runs = 1 + exposure = duration + + # Loop over number of runs + for run in range(n_runs): + + # Set positions and duration + obs = {'lon': pnt['x'], 'lat': pnt['y'], 'duration': exposure} + + # Optionally add-in site dependent IRF + if site != None: + + # If automatic site switching is requested then set the North + # IRF for declinations greater or equal than "autodec" and the + # South IRF for declination smaller than "autodec". + if site == 'Automatic': + pos = gammalib.GSkyDir() + pos.lb_deg(pnt['x'], pnt['y']) + dec = pos.dec_deg() + if (dec >= autodec): + obs_site = 'North' + else: + obs_site = 'South' + + # ... otherwise use the specified site, North or South else: - obs_site = 'South' + obs_site = site - # ... otherwise use the specified site, North or South - else: - obs_site = site + # Set IRF + irf = set_irf(obs_site, obs, caldb, lst=lst) - # Set IRF - irf = set_irf(obs_site, obs, caldb, lst=lst) + # Set IRF information + obs['caldb'] = caldb + obs['irf'] = irf - # Set IRF information - obs['caldb'] = caldb - obs['irf'] = irf + # Add up exposure for a given site + if obs_site == 'North': + exposure_north += exposure + else: + exposure_south += exposure - # Add up exposure for a given site - if obs_site == 'North': - exposure_north += duration - else: - exposure_south += duration - - # Append observation - obsdef.append(obs) + # Append observation + obsdef.append(obs) # Dump statistics print('Number of pointings: %d (%.2f s)' % (n_pnt,duration)) @@ -229,8 +244,8 @@ def set_irf(site, obs, caldb, lst=True): else: irf = 'South_50h' - # Handle 'prod3' - elif caldb == 'prod3': + # Handle 'prod3' and 'prod3b' + elif caldb == 'prod3' or caldb == 'prod3b': # Compute Right Ascension and Declination of pointing pnt = gammalib.GSkyDir() @@ -249,13 +264,14 @@ def set_irf(site, obs, caldb, lst=True): # Set IRF if site == 'North': - irf = 'North_50h' + irf = 'North' else: - irf = 'South_50h' + irf = 'South' if zenith < 30.0: irf += '_z20' else: irf += '_z40' + irf += '_50h' # ... otherwise return an empty string else: @@ -534,7 +550,7 @@ def make_pointings(): sys.exit() # Set calibration database - caldb = 'prod3' + caldb = 'prod3b' lst = True # Galactic plane survey