Calibration samples are displayed with different markers and colors on the concentration fields (fine and sand).
parent
76c654046a
commit
2e2ff1984a
|
|
@ -21,6 +21,8 @@ import datetime
|
|||
|
||||
from scipy import stats
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
import Translation.constant_string as cs
|
||||
|
||||
from View.checkable_combobox import CheckableComboBox
|
||||
|
|
@ -577,17 +579,6 @@ class AcousticInversionTab(QWidget):
|
|||
# for _, j in stg.fine_sample_position],
|
||||
# ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
self.pcm_SSC_fine_meas_vs_inv, = self.axis_SSC_fine.plot(stg.time_fine, stg.depth_fine,
|
||||
ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
print(stg.time_fine)
|
||||
print(stg.depth_fine)
|
||||
print([f for _, f in stg.sample_fine])
|
||||
for i, j in stg.sample_fine:
|
||||
self.pcm_SSC_fine_meas_vs_inv_text = self.axis_SSC_fine.text(
|
||||
stg.time_fine[j],
|
||||
stg.depth_fine[j],
|
||||
i)
|
||||
|
||||
else:
|
||||
|
||||
|
|
@ -616,17 +607,44 @@ class AcousticInversionTab(QWidget):
|
|||
-stg.depth_bottom[self.combobox_acoustic_data_choice.currentIndex()],
|
||||
color='black', linewidth=1, linestyle="solid")
|
||||
|
||||
self.pcm_SSC_fine_meas_vs_inv, = self.axis_SSC_fine.plot(stg.time_fine, stg.depth_fine,
|
||||
ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
# --- Plot samples of fine sediments ---
|
||||
time_fine_temp = deepcopy(stg.time_fine)
|
||||
depth_fine_temp = deepcopy(stg.depth_fine)
|
||||
print("0 time_fine_temp, depth_fine_temp, ", time_fine_temp, depth_fine_temp)
|
||||
for s in stg.fine_sample_profile:
|
||||
print("s = ", s)
|
||||
print(stg.time_fine[s[1]])
|
||||
print(stg.depth_fine[s[1]])
|
||||
time_fine_temp.remove(stg.time_fine[s[1]])
|
||||
depth_fine_temp.remove(stg.depth_fine[s[1]])
|
||||
print("1 time_fine_temp, depth_fine_temp, ", time_fine_temp, depth_fine_temp)
|
||||
self.pcm_SSC_fine_meas_vs_inv, = self.axis_SSC_fine.plot(
|
||||
time_fine_temp, depth_fine_temp, ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
print(stg.time_fine)
|
||||
print(stg.depth_fine)
|
||||
print([f for _, f in stg.sample_fine])
|
||||
for i, j in stg.sample_fine:
|
||||
self.pcm_SSC_fine_meas_vs_inv_text = self.axis_SSC_fine.text(
|
||||
stg.time_fine[j],
|
||||
stg.depth_fine[j],
|
||||
i)
|
||||
time_fine_temp = deepcopy(stg.time_fine)
|
||||
depth_fine_temp = deepcopy(stg.depth_fine)
|
||||
sample_fine_temp = deepcopy(stg.sample_fine)
|
||||
print("0 sample_fine_temp ", sample_fine_temp)
|
||||
for s in stg.fine_sample_profile:
|
||||
sample_fine_temp.remove(s)
|
||||
time_fine_temp.remove(stg.time_fine[s[1]])
|
||||
depth_fine_temp.remove(stg.depth_fine[s[1]])
|
||||
print("1 sample_fine_temp ", sample_fine_temp)
|
||||
for i in range(len(sample_fine_temp)):
|
||||
self.pcm_SSC_fine_meas_vs_inv_text = self.axis_SSC_fine.text(
|
||||
time_fine_temp[i],
|
||||
depth_fine_temp[i], sample_fine_temp[i][0])
|
||||
|
||||
time_fine_temp, depth_fine_temp = stg.time_fine, stg.depth_fine
|
||||
self.pcm_SSC_fine_meas_vs_inv_sample_calibration, = self.axis_SSC_fine.plot(
|
||||
[time_fine_temp[s[1]] for s in stg.fine_sample_profile],
|
||||
[depth_fine_temp[s[1]] for s in stg.fine_sample_profile],
|
||||
ls=" ", marker="*", ms=12, mec="r", mfc="r")
|
||||
|
||||
time_fine_temp, depth_fine_temp = stg.time_fine, stg.depth_fine
|
||||
for i, j in stg.fine_sample_profile:
|
||||
self.pcm_SSC_fine_meas_vs_inv_sample_calibration_text = self.axis_SSC_fine.text(
|
||||
time_fine_temp[j]+5, depth_fine_temp[j]+0.05, i, color='r', fontweight='bold')
|
||||
|
||||
# self.pcm_SSC_fine_meas_vs_inv, = self.axis_SSC_fine.plot(
|
||||
# [stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
|
|
@ -1093,25 +1111,27 @@ class AcousticInversionTab(QWidget):
|
|||
|
||||
def update_plot_sample_position_on_concentration_field(self):
|
||||
# --- Plot sample position on concentration field ---
|
||||
# self.pcm_SSC_fine_meas_vs_inv.set_data(
|
||||
# [stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
# stg.frequency_for_inversion[1],
|
||||
# stg.fine_sample_position[i][0]]
|
||||
# for i in self.fine_sample_to_plot],
|
||||
# [-stg.depth_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
# stg.frequency_for_inversion[1],
|
||||
# stg.fine_sample_position[j][1]]
|
||||
# for j in self.fine_sample_to_plot]
|
||||
# )
|
||||
|
||||
self.pcm_SSC_fine_meas_vs_inv.set_data([stg.time_fine[i] for i in self.fine_sample_to_plot],
|
||||
[stg.depth_fine[j] for j in self.fine_sample_to_plot])
|
||||
self.figure_SSC_fine.canvas.draw_idle()
|
||||
self.pcm_SSC_fine_meas_vs_inv.set_data(
|
||||
[[stg.time_fine.remove(s) for s in stg.fine_sample_profile[1]][i] for i in self.fine_sample_to_plot] ,
|
||||
[[stg.depth_fine.remove(s) for s in stg.fine_sample_profile[1]][j] for j in self.fine_sample_to_plot],
|
||||
ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
self.pcm_SSC_fine_meas_vs_inv_sample_calibration.set_data(
|
||||
[[stg.time_fine[s] for s in stg.fine_sample_profile[1]][i] for i in self.fine_sample_to_plot] ,
|
||||
[[stg.depth_fine[s] for s in stg.fine_sample_profile[1]][j] for j in self.fine_sample_to_plot],
|
||||
ls=" ", marker="*", ms=5, mec="r", mfc="r")
|
||||
|
||||
for i in self.fine_sample_to_plot:
|
||||
self.pcm_SSC_fine_meas_vs_inv_text.set_text(stg.sample_fine[i][0])
|
||||
self.pcm_SSC_fine_meas_vs_inv_text.set_position(stg.time_fine[i], stg.depth_fine[i])
|
||||
self.figure_SSC_fine.canvas.draw_idle()
|
||||
for t in stg.fine_sample_profile[0]:
|
||||
if i == t:
|
||||
self.pcm_SSC_fine_meas_vs_inv_sample_calibration_text.set_text(stg.sample_fine[i][0])
|
||||
self.pcm_SSC_fine_meas_vs_inv_sample_calibration_text.set_position(stg.time_fine[i], stg.depth_fine[i])
|
||||
else:
|
||||
self.pcm_SSC_fine_meas_vs_inv_text.set_text(stg.sample_fine[i][0])
|
||||
self.pcm_SSC_fine_meas_vs_inv_text.set_position(stg.time_fine[i], stg.depth_fine[i])
|
||||
|
||||
self.figure_SSC_fine.canvas.draw_idle()
|
||||
|
||||
def plot_SSC_sand(self):
|
||||
|
||||
|
|
@ -1204,14 +1224,14 @@ class AcousticInversionTab(QWidget):
|
|||
self.pcm_SSC_sand_meas_vs_inv, = self.axis_SSC_sand.plot(stg.time_sand, stg.depth_sand,
|
||||
ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
print(stg.time_sand)
|
||||
print(stg.depth_sand)
|
||||
print([f for _, f in stg.sample_sand])
|
||||
for i, j in stg.sample_sand:
|
||||
self.pcm_SSC_sand_meas_vs_inv_text = self.axis_SSC_sand.text(
|
||||
stg.time_sand[j],
|
||||
stg.depth_sand[j],
|
||||
i)
|
||||
# print(stg.time_sand)
|
||||
# print(stg.depth_sand)
|
||||
# print([f for _, f in stg.sample_sand])
|
||||
# for i, j in stg.sample_sand:
|
||||
# self.pcm_SSC_sand_meas_vs_inv_text = self.axis_SSC_sand.text(
|
||||
# stg.time_sand[j],
|
||||
# stg.depth_sand[j],
|
||||
# i)
|
||||
|
||||
else:
|
||||
|
||||
|
|
@ -1252,14 +1272,44 @@ class AcousticInversionTab(QWidget):
|
|||
self.pcm_SSC_sand_meas_vs_inv, = self.axis_SSC_sand.plot(stg.time_sand, stg.depth_sand,
|
||||
ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
print(stg.time_sand)
|
||||
print(stg.depth_sand)
|
||||
print([f for _, f in stg.sample_sand])
|
||||
for i, j in stg.sample_sand:
|
||||
self.pcm_SSC_sand_meas_vs_inv_text = self.axis_SSC_sand.text(
|
||||
stg.time_sand[j],
|
||||
stg.depth_sand[j],
|
||||
i)
|
||||
# --- Plot samples of fine sediments ---
|
||||
time_sand_temp = deepcopy(stg.time_sand)
|
||||
depth_sand_temp = deepcopy(stg.depth_sand)
|
||||
print("0 time_sand_temp, depth_sand_temp, ", time_sand_temp, depth_sand_temp)
|
||||
for s in stg.sand_sample_target:
|
||||
print("s = ", s)
|
||||
print(stg.time_sand[s[1]])
|
||||
print(stg.depth_sand[s[1]])
|
||||
time_sand_temp.remove(stg.time_sand[s[1]])
|
||||
depth_sand_temp.remove(stg.depth_sand[s[1]])
|
||||
print("1 time_sand_temp, depth_sand_temp, ", time_sand_temp, depth_sand_temp)
|
||||
self.pcm_SSC_sand_meas_vs_inv, = self.axis_SSC_sand.plot(
|
||||
time_sand_temp, depth_sand_temp, ls=" ", marker="o", ms=5, mec="k", mfc="k")
|
||||
|
||||
time_sand_temp = deepcopy(stg.time_sand)
|
||||
depth_sand_temp = deepcopy(stg.depth_sand)
|
||||
sample_sand_temp = deepcopy(stg.sample_sand)
|
||||
print("0 sample_sand_temp ", sample_sand_temp)
|
||||
for s in stg.sand_sample_target:
|
||||
sample_sand_temp.remove(s)
|
||||
time_sand_temp.remove(stg.time_sand[s[1]])
|
||||
depth_sand_temp.remove(stg.depth_sand[s[1]])
|
||||
print("1 sample_sand_temp ", sample_sand_temp)
|
||||
for i in range(len(sample_sand_temp)):
|
||||
self.pcm_SSC_sand_meas_vs_inv_text = self.axis_SSC_sand.text(
|
||||
time_sand_temp[i],
|
||||
depth_sand_temp[i], sample_sand_temp[i][0])
|
||||
|
||||
time_sand_temp, depth_sand_temp = stg.time_sand, stg.depth_sand
|
||||
self.pcm_SSC_sand_meas_vs_inv_sample_calibration, = self.axis_SSC_sand.plot(
|
||||
[time_sand_temp[s[1]] for s in stg.sand_sample_target],
|
||||
[depth_sand_temp[s[1]] for s in stg.sand_sample_target],
|
||||
ls=" ", marker="*", ms=12, mec="r", mfc="r")
|
||||
|
||||
time_sand_temp, depth_sand_temp = stg.time_sand, stg.depth_sand
|
||||
for i, j in stg.sand_sample_target:
|
||||
self.pcm_SSC_sand_meas_vs_inv_sample_calibration_text = self.axis_SSC_sand.text(
|
||||
time_sand_temp[j] + 5, depth_sand_temp[j] + 0.05, i, color='r', fontweight='bold')
|
||||
|
||||
cbar_SSC_sand = self.figure_SSC_sand.colorbar(pcm_SSC_sand, ax=self.axis_SSC_sand, shrink=1,
|
||||
location='right')
|
||||
|
|
|
|||
Loading…
Reference in New Issue