Commit b815cccbc46a500b74da52105a83caa559b92f06

Authored by Jürgen Knödlseder
1 parent fc54dc9f

Hard code zenith angle selection for prod3 response

examples/generate_prod3_irfs.py
@@ -83,6 +83,8 @@ def generate_prod3_irfs(): @@ -83,6 +83,8 @@ def generate_prod3_irfs():
83 caldb['id'] = entry['id'] 83 caldb['id'] = entry['id']
84 caldb['version'] = entry['inst'] 84 caldb['version'] = entry['inst']
85 caldb['analysis'] = entry.setdefault('analysis', 'DESY') 85 caldb['analysis'] = entry.setdefault('analysis', 'DESY')
  86 + caldb['zenith'] = entry.setdefault('zenith', 20.0)
  87 + caldb['azimuth'] = entry.setdefault('azimuth', 0.0)
86 caldb['psftype'] = entry.setdefault('psftype', 'Gauss') 88 caldb['psftype'] = entry.setdefault('psftype', 'Gauss')
87 caldb['norm1d'] = entry.setdefault('norm1d', False) 89 caldb['norm1d'] = entry.setdefault('norm1d', False)
88 caldb['rebin'] = entry.setdefault('rebin', False) 90 caldb['rebin'] = entry.setdefault('rebin', False)
examples/make_pointings.py
@@ -246,7 +246,6 @@ def set_irf(site, obs, caldb, lst=True): @@ -246,7 +246,6 @@ def set_irf(site, obs, caldb, lst=True):
246 246
247 # Compute best possible zenith angle 247 # Compute best possible zenith angle
248 zenith = abs(dec - geolat) 248 zenith = abs(dec - geolat)
249 - print(dec, zenith)  
250 249
251 # Set IRF 250 # Set IRF
252 if site == 'North': 251 if site == 'North':
@@ -442,7 +441,7 @@ def set_lmc(hours=250.0, caldb='prod2', lst=True): @@ -442,7 +441,7 @@ def set_lmc(hours=250.0, caldb='prod2', lst=True):
442 obs = {'lon': lon, 'lat': lat, 'duration': duration} 441 obs = {'lon': lon, 'lat': lat, 'duration': duration}
443 442
444 # Set IRF 443 # Set IRF
445 - irf = set_irf(obs_site, obs, caldb, lst=lst) 444 + irf = set_irf('South', obs, caldb, lst=lst)
446 445
447 # Add IRF 446 # Add IRF
448 obs['caldb'] = caldb 447 obs['caldb'] = caldb
test/test_csroot2caldb.py
@@ -79,7 +79,7 @@ class Test(test): @@ -79,7 +79,7 @@ class Test(test):
79 cmd = csroot2caldb+' infile="'+self._infile+'"'+ \ 79 cmd = csroot2caldb+' infile="'+self._infile+'"'+ \
80 ' outdir="csroot2caldb_cmd1"'+ \ 80 ' outdir="csroot2caldb_cmd1"'+ \
81 ' inst=prod3 id=South_50h version=prod3'+ \ 81 ' inst=prod3 id=South_50h version=prod3'+ \
82 - ' analysis=DESY'+ \ 82 + ' analysis=DESY zenith=20.0 azimuth=0.0'+ \
83 ' logfile="csroot2caldb_cmd1.log" chatter=2' 83 ' logfile="csroot2caldb_cmd1.log" chatter=2'
84 84
85 # Check if execution of wrong command fails 85 # Check if execution of wrong command fails
@@ -107,6 +107,8 @@ class Test(test): @@ -107,6 +107,8 @@ class Test(test):
107 caldb['id'] = 'South_50h' 107 caldb['id'] = 'South_50h'
108 caldb['version'] = 'prod3' 108 caldb['version'] = 'prod3'
109 caldb['analysis'] = 'DESY' 109 caldb['analysis'] = 'DESY'
  110 + caldb['zenith'] = 20.0
  111 + caldb['azimuth'] = 0.0
110 caldb['psftype'] = 'King' 112 caldb['psftype'] = 'King'
111 caldb['norm1d'] = True 113 caldb['norm1d'] = True
112 caldb['rebin'] = True 114 caldb['rebin'] = True