dev: добавлены параметры теслы в operator_params
This commit is contained in:
parent
507036e81c
commit
d4f7d61607
@ -128,20 +128,20 @@
|
|||||||
0.005
|
0.005
|
||||||
],
|
],
|
||||||
"time_wielding": [
|
"time_wielding": [
|
||||||
1.0,
|
1.332,
|
||||||
1.0,
|
1.644,
|
||||||
1.0,
|
1.644,
|
||||||
1.0,
|
1.428,
|
||||||
1.0,
|
1.284,
|
||||||
1.0,
|
1.308,
|
||||||
1.0,
|
1.272,
|
||||||
1.0,
|
1.38,
|
||||||
1.0,
|
1.416,
|
||||||
1.0,
|
1.392,
|
||||||
1.0,
|
1.38,
|
||||||
1.0,
|
1.404,
|
||||||
1.0,
|
1.452,
|
||||||
1.0
|
1.452
|
||||||
],
|
],
|
||||||
"time_command": [
|
"time_command": [
|
||||||
0.0,
|
0.0,
|
||||||
@ -192,7 +192,7 @@
|
|||||||
0.0045
|
0.0045
|
||||||
],
|
],
|
||||||
"force_target": [
|
"force_target": [
|
||||||
4000.0,
|
5000.0,
|
||||||
5000.0,
|
5000.0,
|
||||||
5000.0,
|
5000.0,
|
||||||
5000.0,
|
5000.0,
|
||||||
@ -222,5 +222,126 @@
|
|||||||
500.0,
|
500.0,
|
||||||
500.0,
|
500.0,
|
||||||
500.0
|
500.0
|
||||||
|
],
|
||||||
|
"Tesla closing": [
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.252,
|
||||||
|
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.228,
|
||||||
|
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.216,
|
||||||
|
|
||||||
|
0.216
|
||||||
|
|
||||||
|
],
|
||||||
|
"Tesla squeeze": [
|
||||||
|
0.276,
|
||||||
|
|
||||||
|
0.288,
|
||||||
|
|
||||||
|
0.264,
|
||||||
|
|
||||||
|
0.264,
|
||||||
|
|
||||||
|
0.276,
|
||||||
|
|
||||||
|
0.276,
|
||||||
|
|
||||||
|
0.312,
|
||||||
|
|
||||||
|
0.276,
|
||||||
|
|
||||||
|
0.240,
|
||||||
|
|
||||||
|
0.240,
|
||||||
|
|
||||||
|
0.240,
|
||||||
|
|
||||||
|
0.240,
|
||||||
|
|
||||||
|
0.240,
|
||||||
|
|
||||||
|
0.240
|
||||||
|
|
||||||
|
],
|
||||||
|
"Tesla welding": [
|
||||||
|
1.332,
|
||||||
|
|
||||||
|
1.644,
|
||||||
|
|
||||||
|
1.644,
|
||||||
|
|
||||||
|
1.428,
|
||||||
|
|
||||||
|
1.284,
|
||||||
|
|
||||||
|
1.308,
|
||||||
|
|
||||||
|
1.272,
|
||||||
|
|
||||||
|
1.380,
|
||||||
|
|
||||||
|
1.416,
|
||||||
|
|
||||||
|
1.392,
|
||||||
|
|
||||||
|
1.380,
|
||||||
|
|
||||||
|
1.404,
|
||||||
|
|
||||||
|
1.452,
|
||||||
|
|
||||||
|
1.452
|
||||||
|
|
||||||
|
],
|
||||||
|
"Tesla oncomming_relief": [
|
||||||
|
0.528,
|
||||||
|
|
||||||
|
0.528,
|
||||||
|
|
||||||
|
0.540,
|
||||||
|
|
||||||
|
0.636,
|
||||||
|
|
||||||
|
0.504,
|
||||||
|
|
||||||
|
0.468,
|
||||||
|
|
||||||
|
0.492,
|
||||||
|
|
||||||
|
0.540,
|
||||||
|
|
||||||
|
0.563,
|
||||||
|
|
||||||
|
0.588,
|
||||||
|
|
||||||
|
0.541,
|
||||||
|
|
||||||
|
0.564,
|
||||||
|
|
||||||
|
0.576,
|
||||||
|
|
||||||
|
0.507
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
Binary file not shown.
@ -36,8 +36,8 @@ class PassportFormer(BasePointPassportFormer):
|
|||||||
def _build_passports_pocket(self, dataframe: pd.DataFrame) -> list[pd.DataFrame, dict, list]:
|
def _build_passports_pocket(self, dataframe: pd.DataFrame) -> list[pd.DataFrame, dict, list]:
|
||||||
passports_pocket = []
|
passports_pocket = []
|
||||||
events, point_quantity = self._filter_events(dataframe["time"], dataframe)
|
events, point_quantity = self._filter_events(dataframe["time"], dataframe)
|
||||||
system_settings = {key: value[0] for key, value in self._params[1].items()}
|
|
||||||
|
|
||||||
|
system_settings = {key: value[0] for key, value in self._params[1].items()}
|
||||||
for i in range(0, point_quantity):
|
for i in range(0, point_quantity):
|
||||||
if not dataframe["time"].isna().all():
|
if not dataframe["time"].isna().all():
|
||||||
operator_settings = {}
|
operator_settings = {}
|
||||||
@ -56,7 +56,8 @@ class PassportFormer(BasePointPassportFormer):
|
|||||||
else:
|
else:
|
||||||
frame = dataframe
|
frame = dataframe
|
||||||
point_events = {key: [value[0][i], value[1][i]] for key, value in events.items()}
|
point_events = {key: [value[0][i], value[1][i]] for key, value in events.items()}
|
||||||
passports_pocket.append([frame, ideal_data, point_events])
|
tesla_events = sum([operator_settings[key] for key in self._tesla_stages])
|
||||||
|
passports_pocket.append([frame, ideal_data, point_events, tesla_events])
|
||||||
return passports_pocket
|
return passports_pocket
|
||||||
|
|
||||||
def update_settings(self, params: list[dict, dict]):
|
def update_settings(self, params: list[dict, dict]):
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel
|
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QGraphicsRectItem
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from numpy import floating
|
from numpy import floating
|
||||||
@ -63,7 +63,7 @@ class PlotWidget(BasePlotWidget):
|
|||||||
return ProcessStage(mean_value=mean, start_index=int(start), finish_index=int(finish))
|
return ProcessStage(mean_value=mean, start_index=int(start), finish_index=int(finish))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _build_widget(self, data: list[pd.DataFrame, dict, list]) -> QWidget:
|
def _build_widget(self, data: list[pd.DataFrame, dict, dict, list]) -> QWidget:
|
||||||
widget = QWidget()
|
widget = QWidget()
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class PlotWidget(BasePlotWidget):
|
|||||||
plot_widget, legend = self._init_plot_widget(title=channel)
|
plot_widget, legend = self._init_plot_widget(title=channel)
|
||||||
settings = description["Settings"]
|
settings = description["Settings"]
|
||||||
|
|
||||||
for dataframe, ideal_data, events in data:
|
for dataframe, ideal_data, events, tesla_data in data:
|
||||||
df_continuous = pd.concat([df_continuous, dataframe], axis=0)
|
df_continuous = pd.concat([df_continuous, dataframe], axis=0)
|
||||||
dataframe_headers = dataframe.columns.tolist()
|
dataframe_headers = dataframe.columns.tolist()
|
||||||
stages = events.keys()
|
stages = events.keys()
|
||||||
@ -149,7 +149,24 @@ class PlotWidget(BasePlotWidget):
|
|||||||
if settings["performance"]:
|
if settings["performance"]:
|
||||||
performance_list = np.array(performance_list)
|
performance_list = np.array(performance_list)
|
||||||
performance_label = QLabel(f"""Performance: best = {round(performance_list.max(),2)} %, worse = {round(performance_list.min(),2)} %, average = {round(performance_list.mean(),2)}%""")
|
performance_label = QLabel(f"""Performance: best = {round(performance_list.max(),2)} %, worse = {round(performance_list.min(),2)} %, average = {round(performance_list.mean(),2)}%""")
|
||||||
|
|
||||||
|
TWC_start = 0
|
||||||
|
TWC_len = df_continuous["time"].max()
|
||||||
|
TWC_region = QGraphicsRectItem(TWC_start, -1000, TWC_start+TWC_len, 100)
|
||||||
|
TWC_region.setBrush(pg.mkBrush(0, 255, 0, 255))
|
||||||
|
|
||||||
|
tesla_start = 0
|
||||||
|
tesla_len = 35.488
|
||||||
|
tesla_reginon = QGraphicsRectItem(tesla_start, -1100, tesla_start+tesla_len ,100)
|
||||||
|
tesla_reginon.setBrush(pg.mkBrush(255, 0, 0, 255))
|
||||||
|
|
||||||
|
time_reduction = round((1 - TWC_len/tesla_len)*100, 2)
|
||||||
|
time_reduction_label = QLabel(f"Time reduction: {time_reduction} %")
|
||||||
|
|
||||||
layout.addWidget(performance_label)
|
layout.addWidget(performance_label)
|
||||||
|
layout.addWidget(time_reduction_label)
|
||||||
|
plot_widget.addItem(TWC_region)
|
||||||
|
plot_widget.addItem(tesla_reginon)
|
||||||
|
|
||||||
layout.addWidget(plot_widget)
|
layout.addWidget(plot_widget)
|
||||||
|
|
||||||
|
|||||||
@ -78,8 +78,9 @@ class settingsWindow(QWidget):
|
|||||||
|
|
||||||
def _restore(self) -> None:
|
def _restore(self) -> None:
|
||||||
self._param_table.setRowCount(len(self._data))
|
self._param_table.setRowCount(len(self._data))
|
||||||
self._param_table.setColumnCount(len(self._data[self._data.keys()[0]]))
|
self._param_table.setColumnCount(len(self._data)+1)
|
||||||
for i, (key, items) in enumerate(self._data.items()):
|
for i, (key, items) in enumerate(self._data.items()):
|
||||||
|
self._param_table.setColumnCount(len(self._data[key])+1)
|
||||||
self._param_table.setItem(i, 0, QTableWidgetItem(key))
|
self._param_table.setItem(i, 0, QTableWidgetItem(key))
|
||||||
for j, item in enumerate(items):
|
for j, item in enumerate(items):
|
||||||
self._param_table.setItem(i, j+1, QTableWidgetItem(str(item)))
|
self._param_table.setItem(i, j+1, QTableWidgetItem(str(item)))
|
||||||
|
|||||||
Binary file not shown.
@ -147,27 +147,31 @@ class BasePlotWidget:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Electrode Force, N": {
|
"Electrode Posicion, mm": {
|
||||||
"Settings": {
|
"Settings": {
|
||||||
"zoom": True,
|
"zoom": False,
|
||||||
"stages": False,
|
"stages": True,
|
||||||
"performance": False,
|
"performance": False,
|
||||||
"ideals": True
|
"ideals": True
|
||||||
},
|
},
|
||||||
"Real_signals": [
|
"Real_signals": [
|
||||||
{
|
{
|
||||||
"name": "Electrode Force, N ME",
|
"name": "Rotor Position, mm ME",
|
||||||
"pen": 'r',
|
"pen": 'r',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Electrode Force, N FE",
|
"name": "Rotor Position, mm FE",
|
||||||
"pen": 'w',
|
"pen": 'w',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Ideal_signals": [
|
"Ideal_signals": [
|
||||||
{
|
{
|
||||||
"name": "Force",
|
"name": "Posicion ME",
|
||||||
"pen": {'color': 'r', 'width':3},
|
"pen": {'color': 'g', 'width':3},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Posicion ME",
|
||||||
|
"pen": {'color': 'b', 'width':3},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -341,6 +345,12 @@ class BasePointPassportFormer:
|
|||||||
"Relief",
|
"Relief",
|
||||||
"Oncomming"
|
"Oncomming"
|
||||||
]
|
]
|
||||||
|
self._tesla_stages = [
|
||||||
|
"Tesla squeeze",
|
||||||
|
"Tesla closing",
|
||||||
|
"Tesla welding",
|
||||||
|
"Tesla oncomming_relief"
|
||||||
|
]
|
||||||
|
|
||||||
def _find_indexes(self,
|
def _find_indexes(self,
|
||||||
signal: str,
|
signal: str,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user