Move use_taupy and taupy_model from s_parameters to p_parameters

This commit is contained in:
Darius Arnold 2018-05-25 12:28:15 +02:00
parent 455733ea19
commit b220059e5b
2 changed files with 6 additions and 6 deletions

View File

@ -226,7 +226,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
# for global seismology: use tau-p method for estimating travel times (needs source and station coords.)
# if not given: sets Lc to infinity to use full stream
if s_params['use_taup'] is True:
if p_params['use_taup'] is True:
Lc = np.inf
print('autopickstation: use_taup flag active.')
if not metadata[1]:
@ -237,7 +237,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
station_coords = get_source_coords(parser, station_id)
if station_coords and origin:
source_origin = origin[0]
model = TauPyModel(s_params['taup_model'])
model = TauPyModel(p_params['taup_model'])
arrivals = model.get_travel_times_geo(
source_origin.depth,
source_origin.latitude,
@ -268,7 +268,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
pstart = max(p_params['pstart'], 0)
pstop = min(p_params['pstop'], len(zdat[0])*zdat[0].stats.delta)
if not s_params['use_taup'] is True or origin:
if p_params['use_taup'] is False or origin:
Lc = p_params['pstop'] - p_params['pstart']
Lwf = zdat[0].stats.endtime - zdat[0].stats.starttime

View File

@ -1373,8 +1373,8 @@ def get_pickparams(pickparam):
:rtype: (dict, dict, dict, dict)
"""
# Define names of all parameters in different groups
p_parameter_names = 'algoP pstart pstop tlta tsnrz hosorder bpz1 bpz2 pickwinP aictsmooth tsmoothP ausP nfacP tpred1z tdet1z Parorder addnoise Precalcwin minAICPslope minAICPSNR timeerrorsP'.split(' ')
s_parameter_names = 'algoS sstart sstop use_taup taup_model bph1 bph2 tsnrh pickwinS tpred1h tdet1h tpred2h tdet2h Sarorder aictsmoothS tsmoothS ausS minAICSslope minAICSSNR Srecalcwin nfacS timeerrorsS zfac'.split(' ')
p_parameter_names = 'algoP pstart pstop use_taup taup_model tlta tsnrz hosorder bpz1 bpz2 pickwinP aictsmooth tsmoothP ausP nfacP tpred1z tdet1z Parorder addnoise Precalcwin minAICPslope minAICPSNR timeerrorsP checkwindowP minfactorP'.split(' ')
s_parameter_names = 'algoS sstart sstop bph1 bph2 tsnrh pickwinS tpred1h tdet1h tpred2h tdet2h Sarorder aictsmoothS tsmoothS ausS minAICSslope minAICSSNR Srecalcwin nfacS timeerrorsS zfac checkwindowS minfactorS'.split(' ')
first_motion_names = 'minFMSNR fmpickwin minfmweight'.split(' ')
signal_length_names = 'minsiglength minpercent noisefactor'.split(' ')
# Get list of values from pickparam by name
@ -1388,7 +1388,7 @@ def get_pickparams(pickparam):
first_motion_params = dict(zip(first_motion_names, fm_parameter_values))
signal_length_params = dict(zip(signal_length_names, sl_parameter_values))
s_params['use_taup'] = real_Bool(s_params['use_taup'])
p_params['use_taup'] = real_Bool(p_params['use_taup'])
return p_params, s_params, first_motion_params, signal_length_params