From 1b16c1352599a2893a452bb180814823653f250f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Wed, 9 Aug 2017 13:28:00 +0200 Subject: [PATCH] [Bugfix] autoPyLoT was running always non-parallel due to iplot argument. --- pylot/core/pick/autopick.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index f1c18284..40b8a39d 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -28,6 +28,14 @@ def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0, metadata=None, stations = [] all_onsets = {} input_tuples = [] + try: + iplot = int(iplot) + except: + if iplot == True or iplot == 'True': + iplot = 2 + else: + iplot = 0 + # get some parameters for quality control from # parameter input file (usually autoPyLoT.in). @@ -44,7 +52,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0, metadata=None, for station in stations: topick = data.select(station=station) - if not iplot: + if iplot == None or iplot == 'None' or iplot == 0: input_tuples.append((topick, param, apverbose, metadata, origin)) if iplot > 0: all_onsets[station] = autopickstation(topick, param, verbose=apverbose,