Commit 2ef938feab976fd83782505ca2bd475906589586

Authored by Jürgen Knödlseder
1 parent aaa3d626

Update 1DC documentation

doc/source/users/tutorials/1dc/scope.rst
@@ -3,13 +3,23 @@ @@ -3,13 +3,23 @@
3 Scope of the First CTA Data Challenge 3 Scope of the First CTA Data Challenge
4 ===================================== 4 =====================================
5 5
6 -The primary goal of the 6 +The goal of the
7 :ref:`First CTA Data Challenge <glossary_1dc>` 7 :ref:`First CTA Data Challenge <glossary_1dc>`
8 -is to make the members of the CTA Consortium Science Working Groups familiar  
9 -with the CTA data format and tools and to stimulate the simulation and  
10 -benchmarking activities in the groups.  
11 -A secondary goal is to test CTA Science Analysis tools and to provide User  
12 -feedback to the code developers. 8 +is to enable the CTA Consortium Science Working Groups to derive science
  9 +benchmarks for the CTA Key Science objectives.
  10 +The
  11 +:ref:`First CTA Data Challenge <glossary_1dc>`
  12 +should provide quantitative estimates of CTA's science capabilities that
  13 +will enable the CTA Consortium Science Working Groups to evaluate science
  14 +trade offs in the future.
  15 +The
  16 +:ref:`First CTA Data Challenge <glossary_1dc>`
  17 +should also result in numerous show cases, including for example images,
  18 +spectra and light curves, that can be used to illustrate CTA's science case,
  19 +and that should enrich the CTA outreach material.
  20 +Last but not least, the
  21 +:ref:`First CTA Data Challenge <glossary_1dc>`
  22 +should also stimulate the enrichment of the CTA Science Case.
13 23
14 The data distributed in the 24 The data distributed in the
15 :ref:`First CTA Data Challenge <glossary_1dc>` 25 :ref:`First CTA Data Challenge <glossary_1dc>`
@@ -23,15 +33,16 @@ The @@ -23,15 +33,16 @@ The
23 have been simulated from high-level 33 have been simulated from high-level
24 :ref:`Instrument Response Functions <glossary_irf>` 34 :ref:`Instrument Response Functions <glossary_irf>`
25 that correspond to an ideal CTA with good and stable atmosphere and instrument 35 that correspond to an ideal CTA with good and stable atmosphere and instrument
26 -conditions; only zenith angles of 20 degrees and 40 degrees **(TBC)** have been 36 +conditions; only zenith angles of 20 degrees and 40 degrees have been
27 simulated. 37 simulated.
28 38
29 Data are provided for the Baseline arrays and the Threshold Implementation. 39 Data are provided for the Baseline arrays and the Threshold Implementation.
30 40
31 -Two Key Science Projects (KSPs) have been simulated using realistic pointing 41 +Three Key Science Projects (KSPs) have been simulated using realistic pointing
32 patterns: 42 patterns:
33 43
34 * the Galactic Plane Scan (GPS) 44 * the Galactic Plane Scan (GPS)
  45 +* the Galactic Centre Survey (GC)
35 * the extragalactic survey 46 * the extragalactic survey
36 47
37 The source model used for the simulations is distributed together with the 48 The source model used for the simulations is distributed together with the
examples/make_pointings.py
@@ -100,7 +100,7 @@ def get_positions(xmin, xmax, ymin, ymax, step): @@ -100,7 +100,7 @@ def get_positions(xmin, xmax, ymin, ymax, step):
100 # Setup patch on the sky # 100 # Setup patch on the sky #
101 # ====================== # 101 # ====================== #
102 def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, 102 def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5,
103 - separation=3.0, hours=100.0, 103 + separation=3.0, hours=100.0, run_duration=30.0,
104 site=None, caldb='prod2', lst=True, autodec=0.0): 104 site=None, caldb='prod2', lst=True, autodec=0.0):
105 """ 105 """
106 Setup pointing patch on the sky 106 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, @@ -118,7 +118,9 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5,
118 separation : float, optional 118 separation : float, optional
119 Pointing separation (deg) 119 Pointing separation (deg)
120 hours : float, optional 120 hours : float, optional
121 - Total observation duration (h) 121 + Total observation duration (hours)
  122 + run_duration : float, optional
  123 + Run duration (min)
122 site : str, optional 124 site : str, optional
123 Array site (one of 'Automatic', 'South', 'North') 125 Array site (one of 'Automatic', 'South', 'North')
124 lst : bool, optional 126 lst : bool, optional
@@ -148,43 +150,56 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, @@ -148,43 +150,56 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5,
148 # Set observations 150 # Set observations
149 for pnt in pointings: 151 for pnt in pointings:
150 152
151 - # Set positions and duration  
152 - obs = {'lon': pnt['x'], 'lat': pnt['y'], 'duration': duration}  
153 -  
154 - # Optionally add-in site dependent IRF  
155 - if site != None:  
156 -  
157 - # If automatic site switching is requested then set the North  
158 - # IRF for declinations greater or equal than "autodec" and the  
159 - # South IRF for declination smaller than "autodec".  
160 - if site == 'Automatic':  
161 - pos = gammalib.GSkyDir()  
162 - pos.lb_deg(pnt['x'], pnt['y'])  
163 - dec = pos.dec_deg()  
164 - if (dec >= autodec):  
165 - obs_site = 'North' 153 + # Compute number of runs for this pointing
  154 + if run_duration > 0.0:
  155 + n_runs = int(duration / (run_duration*60.0) + 0.5)
  156 + exposure = run_duration*60.0
  157 + if n_runs < 1:
  158 + n_runs = 1
  159 + else:
  160 + n_runs = 1
  161 + exposure = duration
  162 +
  163 + # Loop over number of runs
  164 + for run in range(n_runs):
  165 +
  166 + # Set positions and duration
  167 + obs = {'lon': pnt['x'], 'lat': pnt['y'], 'duration': exposure}
  168 +
  169 + # Optionally add-in site dependent IRF
  170 + if site != None:
  171 +
  172 + # If automatic site switching is requested then set the North
  173 + # IRF for declinations greater or equal than "autodec" and the
  174 + # South IRF for declination smaller than "autodec".
  175 + if site == 'Automatic':
  176 + pos = gammalib.GSkyDir()
  177 + pos.lb_deg(pnt['x'], pnt['y'])
  178 + dec = pos.dec_deg()
  179 + if (dec >= autodec):
  180 + obs_site = 'North'
  181 + else:
  182 + obs_site = 'South'
  183 +
  184 + # ... otherwise use the specified site, North or South
166 else: 185 else:
167 - obs_site = 'South' 186 + obs_site = site
168 187
169 - # ... otherwise use the specified site, North or South  
170 - else:  
171 - obs_site = site 188 + # Set IRF
  189 + irf = set_irf(obs_site, obs, caldb, lst=lst)
172 190
173 - # Set IRF  
174 - irf = set_irf(obs_site, obs, caldb, lst=lst) 191 + # Set IRF information
  192 + obs['caldb'] = caldb
  193 + obs['irf'] = irf
175 194
176 - # Set IRF information  
177 - obs['caldb'] = caldb  
178 - obs['irf'] = irf 195 + # Add up exposure for a given site
  196 + if obs_site == 'North':
  197 + exposure_north += exposure
  198 + else:
  199 + exposure_south += exposure
179 200
180 - # Add up exposure for a given site  
181 - if obs_site == 'North':  
182 - exposure_north += duration  
183 - else:  
184 - exposure_south += duration  
185 -  
186 - # Append observation  
187 - obsdef.append(obs) 201 + # Append observation
  202 + obsdef.append(obs)
188 203
189 # Dump statistics 204 # Dump statistics
190 print('Number of pointings: %d (%.2f s)' % (n_pnt,duration)) 205 print('Number of pointings: %d (%.2f s)' % (n_pnt,duration))
@@ -229,8 +244,8 @@ def set_irf(site, obs, caldb, lst=True): @@ -229,8 +244,8 @@ def set_irf(site, obs, caldb, lst=True):
229 else: 244 else:
230 irf = 'South_50h' 245 irf = 'South_50h'
231 246
232 - # Handle 'prod3'  
233 - elif caldb == 'prod3': 247 + # Handle 'prod3' and 'prod3b'
  248 + elif caldb == 'prod3' or caldb == 'prod3b':
234 249
235 # Compute Right Ascension and Declination of pointing 250 # Compute Right Ascension and Declination of pointing
236 pnt = gammalib.GSkyDir() 251 pnt = gammalib.GSkyDir()
@@ -249,13 +264,14 @@ def set_irf(site, obs, caldb, lst=True): @@ -249,13 +264,14 @@ def set_irf(site, obs, caldb, lst=True):
249 264
250 # Set IRF 265 # Set IRF
251 if site == 'North': 266 if site == 'North':
252 - irf = 'North_50h' 267 + irf = 'North'
253 else: 268 else:
254 - irf = 'South_50h' 269 + irf = 'South'
255 if zenith < 30.0: 270 if zenith < 30.0:
256 irf += '_z20' 271 irf += '_z20'
257 else: 272 else:
258 irf += '_z40' 273 irf += '_z40'
  274 + irf += '_50h'
259 275
260 # ... otherwise return an empty string 276 # ... otherwise return an empty string
261 else: 277 else:
@@ -534,7 +550,7 @@ def make_pointings(): @@ -534,7 +550,7 @@ def make_pointings():
534 sys.exit() 550 sys.exit()
535 551
536 # Set calibration database 552 # Set calibration database
537 - caldb = 'prod3' 553 + caldb = 'prod3b'
538 lst = True 554 lst = True
539 555
540 # Galactic plane survey 556 # Galactic plane survey