From 537b18774acd321b5be6a2b23edcba6af1f02173 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Thu, 10 Dec 2015 13:16:44 +0100 Subject: [PATCH] [fix] fixed multiple calls to print by print one formatted message --- pylot/core/active/activeSeismoPick.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pylot/core/active/activeSeismoPick.py b/pylot/core/active/activeSeismoPick.py index 3cf59e80..0be9d5b4 100644 --- a/pylot/core/active/activeSeismoPick.py +++ b/pylot/core/active/activeSeismoPick.py @@ -143,7 +143,7 @@ class Survey(object): dists.append(shot.getDistance(traceID)) picks.append(shot.getManualPick(traceID)) diffs.append(diffsDic[shot][traceID]) - + label = 'Difference to automatic picks [s]' fig = plt.figure() ax = fig.add_subplot(111) @@ -345,10 +345,19 @@ class Survey(object): count += 1 ttfile.close() srcfile.close() - print 'Wrote output for %s traces' %count - print 'WARNING: output generated for FMTOMO-obsdata. Obsdata seems to take Lat, Lon, Depth and creates output for FMTOMO as Depth, Lat, Lon' - print 'Dimensions of the seismic Array, transformed for FMTOMO, are Depth(%s, %s), Lat(%s, %s), Lon(%s, %s)'%( - min(DepthAll), max(DepthAll), min(LatAll), max(LatAll), min(LonAll), max(LonAll)) + msg = 'Wrote output for {0} traces\n' \ + 'WARNING: output generated for FMTOMO-obsdata. Obsdata seems ' \ + 'to take Lat, Lon, Depth and creates output for FMTOMO as ' \ + 'Depth, Lat, Lon\nDimensions of the seismic Array, ' \ + 'transformed for FMTOMO, are Depth({1}, {2}), Lat({3}, {4}), ' \ + 'Lon({5}, {6})'.format(count, + min(DepthAll), + max(DepthAll), + min(LatAll), + max(LatAll), + min(LonAll), + max(LonAll)) + print(msg) def countPickedTraces(self, shot): count = 0