Merge branch 'develop' of ariadne.geophysik.ruhr-uni-bochum.de:/data/git/pylot into develop

This commit is contained in:
2016-06-01 14:15:14 +02:00
3 changed files with 57 additions and 18 deletions

View File

@@ -40,7 +40,7 @@ class Data(object):
elif isinstance(evtdata, dict):
evt = readPILOTEvent(**evtdata)
evtdata = evt
elif isinstance(evtdata, str):
elif isinstance(evtdata, basestring):
try:
cat = read_events(evtdata)
if len(cat) is not 1:

View File

@@ -127,10 +127,15 @@ def stations_from_pilot(stat_array):
stations = list()
cur_stat = None
for stat in stat_array:
stat = stat.strip()
if stat == cur_stat:
continue
cur_stat = stat
stations.append(stat.strip())
if stat not in stations:
stations.append(stat)
else:
warnings.warn('station {0} listed at least twice, might corrupt '
'phase times', RuntimeWarning)
return stations
@@ -178,9 +183,15 @@ def picksdict_from_picks(evt):
print(e)
onsets = {}
mpp = pick.time
lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty
spe = pick.time_errors.uncertainty
try:
lpp = mpp + pick.time_errors.upper_uncertainty
epp = mpp - pick.time_errors.lower_uncertainty
except TypeError as e:
msg = e.message + ',\n falling back to symmetric uncertainties'
warnings.warn(msg)
lpp = mpp + spe
epp = mpp - spe
phase['mpp'] = mpp
phase['epp'] = epp
phase['lpp'] = lpp