Commit 47ff77cf9b42941682830dc38097f13856db06dd

Authored by Jürgen Knödlseder
1 parent db071294

Correct GC KSP pattern in make_pointings.py script

Showing 1 changed file with 11 additions and 12 deletions
examples/make_pointings.py
... ... @@ -289,7 +289,7 @@ def set_irf(site, obs, caldb, lst=True):
289 289 irf = 'South_50h'
290 290  
291 291 # Handle 'prod3' and 'prod3b'
292   - elif caldb == 'prod3' or caldb == 'prod3b':
  292 + else:
293 293  
294 294 # Compute Right Ascension and Declination of pointing
295 295 pnt = gammalib.GSkyDir()
... ... @@ -317,10 +317,6 @@ def set_irf(site, obs, caldb, lst=True):
317 317 irf += '_z40'
318 318 irf += '_50h'
319 319  
320   - # ... otherwise return an empty string
321   - else:
322   - irf = ''
323   -
324 320 # Return IRF
325 321 return irf
326 322  
... ... @@ -460,7 +456,7 @@ def set_gc(caldb='prod2', lst=True):
460 456 tmin = 7671.0 * 86400.0
461 457  
462 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 460 separation=0.1, hours=525,
465 461 site='South', caldb=caldb, lst=lst))
466 462  
... ... @@ -468,8 +464,8 @@ def set_gc(caldb='prod2', lst=True):
468 464 tmin = set_tmin_for_next_pointing(obsdef[-1]['tmin'], obsdef[-1]['duration'])
469 465  
470 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 469 site='South', caldb=caldb, lst=lst))
474 470  
475 471 # Return observation definition
... ... @@ -610,12 +606,16 @@ def make_pointings():
610 606 need_help = True
611 607 else:
612 608 obsname = sys.argv[1]
  609 + if len(sys.argv) > 2:
  610 + caldb = sys.argv[2]
  611 + else:
  612 + caldb = 'prod3b'
613 613 else:
614 614 need_help = True
615 615  
616 616 # Print help if needed and exit
617 617 if need_help:
618   - print('Usage: make_pointing.py [OPTIONS]')
  618 + print('Usage: make_pointing.py [OPTIONS] [CALDB]')
619 619 print(' -h Display this usage message')
620 620 print(' gps Galactic plane survey (2 row scheme)')
621 621 print(' gps3 Galactic plane survey (3 row scheme)')
... ... @@ -624,9 +624,8 @@ def make_pointings():
624 624 print(' lmc LMC survey')
625 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 630 # Galactic plane survey
632 631 if obsname == 'gps':
... ...