added changes for manual picks
This commit is contained in:
parent
0b1f16866b
commit
3b4e1dcd1e
@ -135,35 +135,41 @@ class Survey(object):
|
|||||||
|
|
||||||
def plotDiffs(self):
|
def plotDiffs(self):
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
diffs = []; dists = []; picks = []
|
diffs = []; dists = []; mpicks = []; picks = []
|
||||||
diffsDic = self.getDiffsFromManual()
|
diffsDic = self.getDiffsFromManual()
|
||||||
for shot in self.data.values():
|
for shot in self.data.values():
|
||||||
for traceID in shot.getTraceIDlist():
|
for traceID in shot.getTraceIDlist():
|
||||||
if shot.getPickFlag(traceID) == 1 and shot.getManualPickFlag(traceID) == 1:
|
if shot.getPickFlag(traceID) == 1 and shot.getManualPickFlag(traceID) == 1:
|
||||||
dists.append(shot.getDistance(traceID))
|
dists.append(shot.getDistance(traceID))
|
||||||
picks.append(shot.getManualPick(traceID))
|
mpicks.append(shot.getManualPick(traceID))
|
||||||
|
picks.append(shot.getPick(traceID))
|
||||||
diffs.append(diffsDic[shot][traceID])
|
diffs.append(diffsDic[shot][traceID])
|
||||||
|
|
||||||
label = 'Difference to automatic picks [s]'
|
labelm = 'manual picks'
|
||||||
|
labela = 'automatic picks'
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
|
|
||||||
sc = ax.scatter(dists, picks, c = diffs, s=5, edgecolors='none', label = label)
|
sc_a = ax.scatter(dists, picks, c = '0.5', s=10, edgecolors='none', label = labela, alpha = 0.3)
|
||||||
|
sc = ax.scatter(dists, mpicks, c = diffs, s=5, edgecolors='none', label = labelm)
|
||||||
cbar = plt.colorbar(sc, fraction=0.05)
|
cbar = plt.colorbar(sc, fraction=0.05)
|
||||||
cbar.set_label(label)
|
cbar.set_label(labelm)
|
||||||
ax.set_xlabel('Distance [m]')
|
ax.set_xlabel('Distance [m]')
|
||||||
ax.set_ylabel('Time [s]')
|
ax.set_ylabel('Time [s]')
|
||||||
ax.text(0.5, 0.95, 'Plot of all MANUAL picks', transform=ax.transAxes, horizontalalignment='center')
|
ax.text(0.5, 0.95, 'Plot of all MANUAL picks', transform=ax.transAxes, horizontalalignment='center')
|
||||||
|
|
||||||
def plotHist(self):
|
def plotHist(self, nbins = 20, ax = None):
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
plt.interactive(True)
|
plt.interactive(True)
|
||||||
diffs = []
|
diffs = []
|
||||||
|
if ax == None:
|
||||||
|
fig = plt.figure()
|
||||||
|
ax = fig.add_subplot(111)
|
||||||
for shot in self.data.values():
|
for shot in self.data.values():
|
||||||
for traceID in shot.getTraceIDlist():
|
for traceID in shot.getTraceIDlist():
|
||||||
if shot.getPickFlag(traceID) == 1 and shot.getManualPickFlag(traceID) == 1:
|
if shot.getPickFlag(traceID) == 1 and shot.getManualPickFlag(traceID) == 1:
|
||||||
diffs.append(self.getDiffsFromManual()[shot][traceID])
|
diffs.append(self.getDiffsFromManual()[shot][traceID])
|
||||||
plt.hist(diffs, 20)
|
plt.hist(diffs, nbins)
|
||||||
plt.title('Histogram of the differences between automatic and manual pick')
|
plt.title('Histogram of the differences between automatic and manual pick')
|
||||||
plt.xlabel('Difference in time (auto - manual) [s]')
|
plt.xlabel('Difference in time (auto - manual) [s]')
|
||||||
|
|
||||||
@ -407,7 +413,7 @@ class Survey(object):
|
|||||||
#shot_dict[shotnumber].plot3dttc(ax = ax, plotpicks = True)
|
#shot_dict[shotnumber].plot3dttc(ax = ax, plotpicks = True)
|
||||||
ax = fig.add_subplot(3, 4, index)
|
ax = fig.add_subplot(3, 4, index)
|
||||||
if mode == '3d':
|
if mode == '3d':
|
||||||
self.getShot(shotnumber).matshow(ax = ax, colorbar = False, annotations = True)
|
self.getShot(shotnumber).matshow(ax = ax, colorbar = False, annotations = True, legend = False)
|
||||||
elif mode == '2d':
|
elif mode == '2d':
|
||||||
self.getShot(shotnumber).plot2dttc(ax)
|
self.getShot(shotnumber).plot2dttc(ax)
|
||||||
self.getShot(shotnumber).plotmanual2dttc(ax)
|
self.getShot(shotnumber).plotmanual2dttc(ax)
|
||||||
|
Loading…
Reference in New Issue
Block a user