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 3 Scope of the First CTA Data Challenge
4 4 =====================================
5 5  
6   -The primary goal of the
  6 +The goal of the
7 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 24 The data distributed in the
15 25 :ref:`First CTA Data Challenge <glossary_1dc>`
... ... @@ -23,15 +33,16 @@ The
23 33 have been simulated from high-level
24 34 :ref:`Instrument Response Functions <glossary_irf>`
25 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 37 simulated.
28 38  
29 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 42 patterns:
33 43  
34 44 * the Galactic Plane Scan (GPS)
  45 +* the Galactic Centre Survey (GC)
35 46 * the extragalactic survey
36 47  
37 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 100 # Setup patch on the sky #
101 101 # ====================== #
102 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 104 site=None, caldb='prod2', lst=True, autodec=0.0):
105 105 """
106 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 118 separation : float, optional
119 119 Pointing separation (deg)
120 120 hours : float, optional
121   - Total observation duration (h)
  121 + Total observation duration (hours)
  122 + run_duration : float, optional
  123 + Run duration (min)
122 124 site : str, optional
123 125 Array site (one of 'Automatic', 'South', 'North')
124 126 lst : bool, optional
... ... @@ -148,43 +150,56 @@ def set_patch(lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5,
148 150 # Set observations
149 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 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 204 # Dump statistics
190 205 print('Number of pointings: %d (%.2f s)' % (n_pnt,duration))
... ... @@ -229,8 +244,8 @@ def set_irf(site, obs, caldb, lst=True):
229 244 else:
230 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 250 # Compute Right Ascension and Declination of pointing
236 251 pnt = gammalib.GSkyDir()
... ... @@ -249,13 +264,14 @@ def set_irf(site, obs, caldb, lst=True):
249 264  
250 265 # Set IRF
251 266 if site == 'North':
252   - irf = 'North_50h'
  267 + irf = 'North'
253 268 else:
254   - irf = 'South_50h'
  269 + irf = 'South'
255 270 if zenith < 30.0:
256 271 irf += '_z20'
257 272 else:
258 273 irf += '_z40'
  274 + irf += '_50h'
259 275  
260 276 # ... otherwise return an empty string
261 277 else:
... ... @@ -534,7 +550,7 @@ def make_pointings():
534 550 sys.exit()
535 551  
536 552 # Set calibration database
537   - caldb = 'prod3'
  553 + caldb = 'prod3b'
538 554 lst = True
539 555  
540 556 # Galactic plane survey
... ...