added two missing figures

This commit is contained in:
Marcel Paffrath 2017-05-08 16:23:10 +02:00
parent a8577ac80a
commit 3090d5fca0
3 changed files with 32 additions and 18 deletions

View File

@ -1 +1 @@
6563-dirty a8577-dirty

View File

@ -236,7 +236,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
# get prelimenary onset time from AIC-HOS-CF using subclass AICPicker # get prelimenary onset time from AIC-HOS-CF using subclass AICPicker
# of class AutoPicking # of class AutoPicking
aicpick = AICPicker(aiccf, tsnrz, pickwinP, iplot, None, tsmoothP) aicpick = AICPicker(aiccf, tsnrz, pickwinP, iplot, None, tsmoothP)
fig_dict['aicFig'] = aicpick.fig key = 'aicFig'
fig_dict[key] = aicpick.fig
############################################################## ##############################################################
if aicpick.getpick() is not None: if aicpick.getpick() is not None:
# check signal length to detect spuriously picked noise peaks # check signal length to detect spuriously picked noise peaks
@ -250,7 +251,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
'Decreasing minsiglengh from {0} to ' \ 'Decreasing minsiglengh from {0} to ' \
'{1}'.format(minsiglength, minsiglength / 2) '{1}'.format(minsiglength, minsiglength / 2)
if verbose: print(msg) if verbose: print(msg)
Pflag, fig_dict['slength'] = checksignallength(zne, aicpick.getpick(), tsnrz, key = 'slength'
Pflag, fig_dict[key] = checksignallength(zne, aicpick.getpick(), tsnrz,
minsiglength / 2, minsiglength / 2,
nfacsl, minpercent, iplot) nfacsl, minpercent, iplot)
else: else:
@ -267,7 +269,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
trH2_filt.taper(max_percentage=0.05, type='hann') trH2_filt.taper(max_percentage=0.05, type='hann')
zne += trH1_filt zne += trH1_filt
zne += trH2_filt zne += trH2_filt
Pflag, fig_dict['slength'] = checksignallength(zne, aicpick.getpick(), tsnrz, key = 'slenght'
Pflag, fig_dict[key] = checksignallength(zne, aicpick.getpick(), tsnrz,
minsiglength, minsiglength,
nfacsl, minpercent, iplot) nfacsl, minpercent, iplot)
@ -279,7 +282,9 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
'Skipping control function checkZ4S.' 'Skipping control function checkZ4S.'
if verbose: print(msg) if verbose: print(msg)
else: else:
Pflag = checkZ4S(zne, aicpick.getpick(), zfac, if iplot>1:
key = 'checkZ4S'
Pflag, fig_dict[key] = checkZ4S(zne, aicpick.getpick(), zfac,
tsnrz[3], iplot) tsnrz[3], iplot)
if Pflag == 0: if Pflag == 0:
Pmarker = 'SinsteadP' Pmarker = 'SinsteadP'
@ -329,14 +334,16 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
algoP=algoP) algoP=algoP)
refPpick = PragPicker(cf2, tsnrz, pickwinP, iplot, ausP, tsmoothP, refPpick = PragPicker(cf2, tsnrz, pickwinP, iplot, ausP, tsmoothP,
aicpick.getpick()) aicpick.getpick())
fig_dict['refPpick'] = refPpick.fig key = 'refPpick'
fig_dict[key] = refPpick.fig
mpickP = refPpick.getpick() mpickP = refPpick.getpick()
############################################################# #############################################################
if mpickP is not None: if mpickP is not None:
# quality assessment # quality assessment
# get earliest/latest possible pick and symmetrized uncertainty # get earliest/latest possible pick and symmetrized uncertainty
if iplot: if iplot:
epickP, lpickP, Perror, fig_dict['el_Ppick'] = earllatepicker(z_copy, nfacP, tsnrz, key = 'el_Ppick'
epickP, lpickP, Perror, fig_dict[key] = earllatepicker(z_copy, nfacP, tsnrz,
mpickP, iplot) mpickP, iplot)
else: else:
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz, epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
@ -362,7 +369,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
# certain quality required # certain quality required
if Pweight <= minfmweight and SNRP >= minFMSNR: if Pweight <= minfmweight and SNRP >= minFMSNR:
if iplot: if iplot:
FM, fig_dict['fm_picker'] = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot) key = 'fm_picker'
FM, fig_dict[key] = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
else: else:
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot) FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
else: else:
@ -465,6 +473,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
# of class AutoPicking # of class AutoPicking
aicarhpick = AICPicker(haiccf, tsnrh, pickwinS, iplot, None, aicarhpick = AICPicker(haiccf, tsnrh, pickwinS, iplot, None,
aictsmoothS) aictsmoothS)
key = 'aicARHfig'
fig_dict[key] = aicarhpick.fig
############################################################### ###############################################################
# go on with processing if AIC onset passes quality control # go on with processing if AIC onset passes quality control
if (aicarhpick.getSlope() >= minAICSslope and if (aicarhpick.getSlope() >= minAICSslope and
@ -520,7 +530,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
# get refined onset time from CF2 using class Picker # get refined onset time from CF2 using class Picker
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS, refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
tsmoothS, aicarhpick.getpick()) tsmoothS, aicarhpick.getpick())
fig_dict['refSpick'] = refSpick.fig key = 'refSpick'
fig_dict[key] = refSpick.fig
mpickS = refSpick.getpick() mpickS = refSpick.getpick()
############################################################# #############################################################
if mpickS is not None: if mpickS is not None:
@ -528,7 +539,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
# get earliest/latest possible pick and symmetrized uncertainty # get earliest/latest possible pick and symmetrized uncertainty
h_copy[0].data = trH1_filt.data h_copy[0].data = trH1_filt.data
if iplot: if iplot:
epickS1, lpickS1, Serror1, fig_dict['el_S1pick'] = earllatepicker(h_copy, nfacS, key = 'el_S1pick'
epickS1, lpickS1, Serror1, fig_dict[key] = earllatepicker(h_copy, nfacS,
tsnrh, tsnrh,
mpickS, iplot) mpickS, iplot)
else: else:
@ -538,7 +550,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
h_copy[0].data = trH2_filt.data h_copy[0].data = trH2_filt.data
if iplot: if iplot:
epickS2, lpickS2, Serror2, fig_dict['el_S2pick'] = earllatepicker(h_copy, nfacS, key = 'el_S2pick'
epickS2, lpickS2, Serror2, fig_dict[key] = earllatepicker(h_copy, nfacS,
tsnrh, tsnrh,
mpickS, iplot) mpickS, iplot)
else: else:
@ -779,7 +792,8 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0):
ax3.set_xlabel('Time [s] after %s' % tr_filt.stats.starttime) ax3.set_xlabel('Time [s] after %s' % tr_filt.stats.starttime)
ax3.set_ylabel('Normalized Counts') ax3.set_ylabel('Normalized Counts')
ax3.set_title(trH2_filt.stats.channel) ax3.set_title(trH2_filt.stats.channel)
fig_dict['mainFig'] = fig key = 'mainFig'
fig_dict[key] = fig
########################################################################## ##########################################################################
# calculate "real" onset times # calculate "real" onset times
if lpickP is not None and lpickP == mpickP: if lpickP is not None and lpickP == mpickP:

View File

@ -980,7 +980,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot):
ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station) ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station)
ax.legend() ax.legend()
return returnflag return returnflag, fig
if __name__ == '__main__': if __name__ == '__main__':