[fix] fixed multiple calls to print by print one formatted message

This commit is contained in:
Sebastian Wehling-Benatelli 2015-12-10 13:16:44 +01:00
parent 17c3dd4f69
commit 537b18774a

View File

@ -143,7 +143,7 @@ class Survey(object):
dists.append(shot.getDistance(traceID)) dists.append(shot.getDistance(traceID))
picks.append(shot.getManualPick(traceID)) picks.append(shot.getManualPick(traceID))
diffs.append(diffsDic[shot][traceID]) diffs.append(diffsDic[shot][traceID])
label = 'Difference to automatic picks [s]' label = 'Difference to automatic picks [s]'
fig = plt.figure() fig = plt.figure()
ax = fig.add_subplot(111) ax = fig.add_subplot(111)
@ -345,10 +345,19 @@ class Survey(object):
count += 1 count += 1
ttfile.close() ttfile.close()
srcfile.close() srcfile.close()
print 'Wrote output for %s traces' %count msg = 'Wrote output for {0} traces\n' \
print 'WARNING: output generated for FMTOMO-obsdata. Obsdata seems to take Lat, Lon, Depth and creates output for FMTOMO as Depth, Lat, Lon' 'WARNING: output generated for FMTOMO-obsdata. Obsdata seems ' \
print 'Dimensions of the seismic Array, transformed for FMTOMO, are Depth(%s, %s), Lat(%s, %s), Lon(%s, %s)'%( 'to take Lat, Lon, Depth and creates output for FMTOMO as ' \
min(DepthAll), max(DepthAll), min(LatAll), max(LatAll), min(LonAll), max(LonAll)) '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): def countPickedTraces(self, shot):
count = 0 count = 0