mirror of https://gitlab.com/pamhyr/pamhyr2
mass zero results fixed
parent
49aab685fb
commit
19a3f3d310
|
|
@ -709,6 +709,7 @@ class AdisTSwc(AdisTS):
|
||||||
###print("pol keys: ", pollutants_keys)
|
###print("pol keys: ", pollutants_keys)
|
||||||
###print("t keys: ", timestamps_keys)
|
###print("t keys: ", timestamps_keys)
|
||||||
###print("phys var: ", phys_data_names)
|
###print("phys var: ", phys_data_names)
|
||||||
|
###print("phys data names mass zero:", list(data_tmp[pollutants_keys[1]][timestamps_keys[0]].keys()))
|
||||||
#print("set timestamps keys: ", set(timestamps_keys))
|
#print("set timestamps keys: ", set(timestamps_keys))
|
||||||
#print("isma")
|
#print("isma")
|
||||||
###print("iprofiles: ", iprofiles)
|
###print("iprofiles: ", iprofiles)
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,10 @@ class TableModel(PamhyrTableModel):
|
||||||
self._lst = tmp_list
|
self._lst = tmp_list
|
||||||
###print("=====table pollutants: ", self._lst)
|
###print("=====table pollutants: ", self._lst)
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, type_pol, **kwargs):
|
||||||
self._timestamp = 0.0
|
self._timestamp = 0.0
|
||||||
#####self._type_pol = type_pol
|
self._type_pol = type_pol
|
||||||
|
print("typ pol from raw data: ", self._type_pol)
|
||||||
super(TableModel, self).__init__(**kwargs)
|
super(TableModel, self).__init__(**kwargs)
|
||||||
|
|
||||||
def data(self, index, role=Qt.DisplayRole):
|
def data(self, index, role=Qt.DisplayRole):
|
||||||
|
|
@ -110,7 +111,7 @@ class TableModel(PamhyrTableModel):
|
||||||
if self._headers[column] == header_name:
|
if self._headers[column] == header_name:
|
||||||
v = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][0]
|
v = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][0]
|
||||||
return f"{v:.4f}"
|
return f"{v:.4f}"
|
||||||
elif self._headers[column] == pol + " Mass" and self._: #####
|
elif self._headers[column] == pol + " Mass" and self._type_pol==7: #####
|
||||||
print(self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index])
|
print(self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index])
|
||||||
m1 = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][1]
|
m1 = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][1]
|
||||||
m2 = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][2]
|
m2 = self._lst[row].get_ts_key(self._timestamp, "pols")[pol_index][2]
|
||||||
|
|
|
||||||
|
|
@ -138,12 +138,12 @@ class ResultsWindowAdisTS(PamhyrWindow):
|
||||||
print("t: ", t)
|
print("t: ", t)
|
||||||
table = self.find(QTableView, f"tableView_{t}")
|
table = self.find(QTableView, f"tableView_{t}")
|
||||||
self._table[t] = TableModel(
|
self._table[t] = TableModel(
|
||||||
|
self._type_pol,
|
||||||
table_view=table,
|
table_view=table,
|
||||||
table_headers=self._trad.get_dict(f"table_headers_{t}"),
|
table_headers=self._trad.get_dict(f"table_headers_{t}"),
|
||||||
data=self._results,
|
data=self._results,
|
||||||
undo=self._undo_stack,
|
undo=self._undo_stack,
|
||||||
opt_data=t,
|
opt_data=t,
|
||||||
#####type_pol= self._type_pol,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def setup_slider(self):
|
def setup_slider(self):
|
||||||
|
|
@ -197,29 +197,35 @@ class ResultsWindowAdisTS(PamhyrWindow):
|
||||||
|
|
||||||
print("///plot c adists correct")
|
print("///plot c adists correct")
|
||||||
|
|
||||||
self.canvas_3 = MplCanvas(width=5, height=4, dpi=100)
|
if self._type_pol == 7:
|
||||||
self.canvas_3.setObjectName("canvas_3")
|
self.canvas_3 = MplCanvas(width=5, height=4, dpi=100)
|
||||||
self.toolbar_3 = PamhyrPlotToolbar(
|
self.canvas_3.setObjectName("canvas_3")
|
||||||
self.canvas_3, self, items=[
|
self.toolbar_3 = PamhyrPlotToolbar(
|
||||||
"home", "move", "zoom", "save",
|
self.canvas_3, self, items=[
|
||||||
"iso", "back/forward"
|
"home", "move", "zoom", "save",
|
||||||
]
|
"iso", "back/forward"
|
||||||
)
|
]
|
||||||
self.plot_layout_3 = self.find(
|
)
|
||||||
QVBoxLayout, "verticalLayout_mass")
|
self.plot_layout_3 = self.find(
|
||||||
self.plot_layout_3.addWidget(self.toolbar_3)
|
QVBoxLayout, "verticalLayout_mass")
|
||||||
self.plot_layout_3.addWidget(self.canvas_3)
|
self.plot_layout_3.addWidget(self.toolbar_3)
|
||||||
|
self.plot_layout_3.addWidget(self.canvas_3)
|
||||||
|
|
||||||
self.plot_m = PlotM(
|
self.plot_m = PlotM(
|
||||||
canvas=self.canvas_3,
|
canvas=self.canvas_3,
|
||||||
results=self._results,
|
results=self._results,
|
||||||
reach_id=0,
|
reach_id=0,
|
||||||
profile_id=0,
|
profile_id=0,
|
||||||
pol_id=0,
|
pol_id=0,
|
||||||
trad=self._trad,
|
trad=self._trad,
|
||||||
toolbar=self.toolbar_3
|
toolbar=self.toolbar_3
|
||||||
)
|
)
|
||||||
self.plot_m.draw()
|
self.plot_m.draw()
|
||||||
|
else:
|
||||||
|
print("hear -------------------------------------------------------------------------------")
|
||||||
|
#self.find(QVBoxLayout, "verticalLayout_mass").setDisabled(True)
|
||||||
|
|
||||||
|
self.find(QTabWidget, "tabWidget").setTabVisible(2, False) ###setTabEnabled(2, False)
|
||||||
|
|
||||||
print("///plot m adists correct")
|
print("///plot m adists correct")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab_4">
|
<widget class="QWidget" name="tab_4">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue