Modified writephases for NLLoc: writes dummy onset times (start of seismic trace) into phase file in order to derive theoretical onset times later needed for iterative picking.
This commit is contained in:
parent
8592557613
commit
e1c2629f97
@ -961,7 +961,8 @@ def writephases(arrivals, fformat, filename):
|
|||||||
# write header
|
# write header
|
||||||
fid.write('# EQEVENT: Label: EQ001 Loc: X 0.00 Y 0.00 Z 10.00 OT 0.00 \n')
|
fid.write('# EQEVENT: Label: EQ001 Loc: X 0.00 Y 0.00 Z 10.00 OT 0.00 \n')
|
||||||
for key in arrivals:
|
for key in arrivals:
|
||||||
if arrivals[key]['P']['weight'] < 4:
|
# P onsets
|
||||||
|
if arrivals[key]['P']:
|
||||||
fm = arrivals[key]['P']['fm']
|
fm = arrivals[key]['P']['fm']
|
||||||
if fm == None:
|
if fm == None:
|
||||||
fm = '?'
|
fm = '?'
|
||||||
@ -974,15 +975,21 @@ def writephases(arrivals, fformat, filename):
|
|||||||
ss = onset.second
|
ss = onset.second
|
||||||
ms = onset.microsecond
|
ms = onset.microsecond
|
||||||
ss_ms = ss + ms / 1000000.0
|
ss_ms = ss + ms / 1000000.0
|
||||||
fid.write('%s ? ? ? P %s %d%02d%02d %02d%02d %7.4f GAU 0 0 0 0 1 \n' % (key,
|
if arrivals[key]['P']['weight'] < 4:
|
||||||
|
pweight = 1 # use pick
|
||||||
|
else:
|
||||||
|
pweight = 0 # do not use pick
|
||||||
|
fid.write('%s ? ? ? P %s %d%02d%02d %02d%02d %7.4f GAU 0 0 0 0 %d \n' % (key,
|
||||||
fm,
|
fm,
|
||||||
year,
|
year,
|
||||||
month,
|
month,
|
||||||
day,
|
day,
|
||||||
hh,
|
hh,
|
||||||
mm,
|
mm,
|
||||||
ss_ms))
|
ss_ms,
|
||||||
if arrivals[key]['S']['weight'] < 4:
|
pweight))
|
||||||
|
# S onsets
|
||||||
|
if arrivals[key]['S']:
|
||||||
fm = '?'
|
fm = '?'
|
||||||
onset = arrivals[key]['S']['mpp']
|
onset = arrivals[key]['S']['mpp']
|
||||||
year = onset.year
|
year = onset.year
|
||||||
@ -993,14 +1000,19 @@ def writephases(arrivals, fformat, filename):
|
|||||||
ss = onset.second
|
ss = onset.second
|
||||||
ms = onset.microsecond
|
ms = onset.microsecond
|
||||||
ss_ms = ss + ms / 1000000.0
|
ss_ms = ss + ms / 1000000.0
|
||||||
fid.write('%s ? ? ? S %s %d%02d%02d %02d%02d %7.4f GAU 0 0 0 0 1 \n' % (key,
|
if arrivals[key]['S']['weight'] < 4:
|
||||||
|
sweight = 1 # use pick
|
||||||
|
else:
|
||||||
|
sweight = 0 # do not use pick
|
||||||
|
fid.write('%s ? ? ? S %s %d%02d%02d %02d%02d %7.4f GAU 0 0 0 0 %d \n' % (key,
|
||||||
fm,
|
fm,
|
||||||
year,
|
year,
|
||||||
month,
|
month,
|
||||||
day,
|
day,
|
||||||
hh,
|
hh,
|
||||||
mm,
|
mm,
|
||||||
ss_ms))
|
ss_ms,
|
||||||
|
sweight))
|
||||||
|
|
||||||
fid.close()
|
fid.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user