Commit ed1c0c27234e424fc511f2592c967aa838fb912e

Authored by Jürgen Knödlseder
2 parents 42991488 e9aa2da0

Merge branch '1dc-gc-simulation' into integration

examples/make_pointings.py
@@ -289,7 +289,7 @@ def set_irf(site, obs, caldb, lst=True): @@ -289,7 +289,7 @@ def set_irf(site, obs, caldb, lst=True):
289 irf = 'South_50h' 289 irf = 'South_50h'
290 290
291 # Handle 'prod3' and 'prod3b' 291 # Handle 'prod3' and 'prod3b'
292 - elif caldb == 'prod3' or caldb == 'prod3b': 292 + else:
293 293
294 # Compute Right Ascension and Declination of pointing 294 # Compute Right Ascension and Declination of pointing
295 pnt = gammalib.GSkyDir() 295 pnt = gammalib.GSkyDir()
@@ -317,10 +317,6 @@ def set_irf(site, obs, caldb, lst=True): @@ -317,10 +317,6 @@ def set_irf(site, obs, caldb, lst=True):
317 irf += '_z40' 317 irf += '_z40'
318 irf += '_50h' 318 irf += '_50h'
319 319
320 - # ... otherwise return an empty string  
321 - else:  
322 - irf = ''  
323 -  
324 # Return IRF 320 # Return IRF
325 return irf 321 return irf
326 322
@@ -460,7 +456,7 @@ def set_gc(caldb='prod2', lst=True): @@ -460,7 +456,7 @@ def set_gc(caldb='prod2', lst=True):
460 tmin = 7671.0 * 86400.0 456 tmin = 7671.0 * 86400.0
461 457
462 # Central wobble 458 # Central wobble
463 - obsdef.extend(set_patch(tmin, lmin=-0.5, lmax=0.5, bmin=-0.5, bmax=0.5, 459 + obsdef.extend(set_patch(tmin, lmin=-1.0, lmax=1.0, bmin=-1.0, bmax=1.0,
464 separation=0.1, hours=525, 460 separation=0.1, hours=525,
465 site='South', caldb=caldb, lst=lst)) 461 site='South', caldb=caldb, lst=lst))
466 462
@@ -468,8 +464,8 @@ def set_gc(caldb='prod2', lst=True): @@ -468,8 +464,8 @@ def set_gc(caldb='prod2', lst=True):
468 tmin = set_tmin_for_next_pointing(obsdef[-1]['tmin'], obsdef[-1]['duration']) 464 tmin = set_tmin_for_next_pointing(obsdef[-1]['tmin'], obsdef[-1]['duration'])
469 465
470 # Extended region 466 # Extended region
471 - obsdef.extend(set_patch(tmin, lmin=-10.0, lmax=10.0, bmin=-10.0, bmax=10.0,  
472 - separation=1.5, hours=300, 467 + obsdef.extend(set_patch(tmin, lmin=-3.0, lmax=3.0, bmin=3.0, bmax=10.0,
  468 + separation=0.5, hours=300,
473 site='South', caldb=caldb, lst=lst)) 469 site='South', caldb=caldb, lst=lst))
474 470
475 # Return observation definition 471 # Return observation definition
@@ -610,12 +606,16 @@ def make_pointings(): @@ -610,12 +606,16 @@ def make_pointings():
610 need_help = True 606 need_help = True
611 else: 607 else:
612 obsname = sys.argv[1] 608 obsname = sys.argv[1]
  609 + if len(sys.argv) > 2:
  610 + caldb = sys.argv[2]
  611 + else:
  612 + caldb = 'prod3b'
613 else: 613 else:
614 need_help = True 614 need_help = True
615 615
616 # Print help if needed and exit 616 # Print help if needed and exit
617 if need_help: 617 if need_help:
618 - print('Usage: make_pointing.py [OPTIONS]') 618 + print('Usage: make_pointing.py [OPTIONS] [CALDB]')
619 print(' -h Display this usage message') 619 print(' -h Display this usage message')
620 print(' gps Galactic plane survey (2 row scheme)') 620 print(' gps Galactic plane survey (2 row scheme)')
621 print(' gps3 Galactic plane survey (3 row scheme)') 621 print(' gps3 Galactic plane survey (3 row scheme)')
@@ -624,9 +624,8 @@ def make_pointings(): @@ -624,9 +624,8 @@ def make_pointings():
624 print(' lmc LMC survey') 624 print(' lmc LMC survey')
625 sys.exit() 625 sys.exit()
626 626
627 - # Set calibration database  
628 - caldb = 'prod3b'  
629 - lst = True 627 + # Set LST simulation flag to true
  628 + lst = True
630 629
631 # Galactic plane survey 630 # Galactic plane survey
632 if obsname == 'gps': 631 if obsname == 'gps':
examples/show_pointings.py
@@ -128,7 +128,7 @@ def plot_pointings(pnt, plotfile): @@ -128,7 +128,7 @@ def plot_pointings(pnt, plotfile):
128 color='b' 128 color='b'
129 129
130 # Set circle 130 # Set circle
131 - circle = plt.Circle((l, p['b']), 4.0, color=color, fill=False) 131 + circle = plt.Circle((l, p['b']), 3.0, color=color, fill=False)
132 132
133 # Add circle 133 # Add circle
134 ax.add_artist(circle) 134 ax.add_artist(circle)