diff --git a/params/system_params.json b/params/system_params.json index 54497d3..1328fb2 100644 --- a/params/system_params.json +++ b/params/system_params.json @@ -51,7 +51,7 @@ 0.075 ], "time_capture": [ - 100000.0 + 1000.0 ], "UML_time_scaler": [ 1000.0 diff --git a/src/controller/__pycache__/passportFormer.cpython-310.pyc b/src/controller/__pycache__/passportFormer.cpython-310.pyc index 2bbeeec..95d7b18 100644 Binary files a/src/controller/__pycache__/passportFormer.cpython-310.pyc and b/src/controller/__pycache__/passportFormer.cpython-310.pyc differ diff --git a/src/controller/passportFormer.py b/src/controller/passportFormer.py index 7d9bb3d..8abb3ba 100644 --- a/src/controller/passportFormer.py +++ b/src/controller/passportFormer.py @@ -50,6 +50,8 @@ class PassportFormer(BasePointPassportFormer): time_is_valid = not dataframe["time"].isna().all() if time_is_valid: + + idx_shift = True if events[self._stages[-1]][1][0] == 0 else False for i in range(point_quantity): operator_settings = { @@ -65,7 +67,8 @@ class PassportFormer(BasePointPassportFormer): ideal_data = self._build_ideal_data(idealDataBuilder=idealDataBuilder, params=params_list) self._ideal_data_cashe[cache_key] = ideal_data print(f"Cache miss. Computed and cached.") - point_timeframe = [events[self._stages[0]][0][i], events[self._stages[-1]][1][i+1]] + idx = i+1 if idx_shift else i + point_timeframe = [events[self._stages[0]][0][i], events[self._stages[-1]][1][idx]] point_events = {key: [value[0][i], value[1][i]] for key, value in events.items()} diff --git a/src/gui/__pycache__/plotter.cpython-310.pyc b/src/gui/__pycache__/plotter.cpython-310.pyc index 3d9b74d..e3db155 100644 Binary files a/src/gui/__pycache__/plotter.cpython-310.pyc and b/src/gui/__pycache__/plotter.cpython-310.pyc differ diff --git a/src/gui/plotter.py b/src/gui/plotter.py index a1dfbcc..235a451 100644 --- a/src/gui/plotter.py +++ b/src/gui/plotter.py @@ -3,9 +3,7 @@ from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel import pyqtgraph as pg -import numpy as np from typing import Optional, Any -from PyQt5.QtOpenGL import QGLWidget from utils.base.base import BasePlotWidget @@ -104,6 +102,7 @@ class PlotWidget(BasePlotWidget): # Оптимизация отображения графиков plot_widget.setDownsampling(auto=True, mode='peak') plot_widget.showGrid(x=True, y=True) + plot_widget.setClipToView(True) legend = pg.LegendItem((80, 60), offset=(70, 20)) legend.setParentItem(plot_widget.graphicsItem()) return plot_widget, legend @@ -198,7 +197,7 @@ class PlotWidget(BasePlotWidget): Собирает графический виджет для одного набора данных. Параметр `data` предполагается списком: [dataframe, points_pocket, tesla_time]. """ - widget = QGLWidget() + widget = QWidget() layout = QVBoxLayout(widget) dataframe, points_pocket, tesla_time = data diff --git a/src/utils/base/__pycache__/base.cpython-310.pyc b/src/utils/base/__pycache__/base.cpython-310.pyc index 9770f9b..8c98d92 100644 Binary files a/src/utils/base/__pycache__/base.cpython-310.pyc and b/src/utils/base/__pycache__/base.cpython-310.pyc differ