[bugfix] multiprocessing problem fixed, caused by a general bug passing wrong argument [fig_dict] to AIC instead of [fig_dict[key]]; also iplot flag is correctly read from parameter file now

This commit is contained in:
Marcel Paffrath 2017-05-18 13:16:53 +02:00
parent 46236eeb55
commit a8861dfdab
3 changed files with 4 additions and 3 deletions

View File

@ -73,6 +73,7 @@ def autoPyLoT(input_dict=None, parameter=None, inputfile=None, fnames=None, save
if not parameter: if not parameter:
if inputfile: if inputfile:
parameter = AutoPickParameter(inputfile) parameter = AutoPickParameter(inputfile)
iplot = parameter['iplot']
else: else:
print('No parameters set and no input file given. Choose either of both.') print('No parameters set and no input file given. Choose either of both.')
return return

View File

@ -1 +1 @@
0a91-dirty 4623-dirty

View File

@ -49,7 +49,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None):
if iplot>0: if iplot>0:
print('iPlot Flag active: NO MULTIPROCESSING possible.') print('iPlot Flag active: NO MULTIPROCESSING possible.')
return all_onsets return all_onsets
pool = gen_Pool() pool = gen_Pool()
result = pool.map(call_autopickstation, input_tuples) result = pool.map(call_autopickstation, input_tuples)
pool.close() pool.close()
@ -237,7 +237,7 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0, fig_dict=None):
fig = fig_dict[key] fig = fig_dict[key]
else: else:
fig = None fig = None
aicpick = AICPicker(aiccf, tsnrz, pickwinP, iplot, None, tsmoothP, fig=fig_dict[key]) aicpick = AICPicker(aiccf, tsnrz, pickwinP, iplot, None, tsmoothP, fig=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