dev: описание содержимого PlotWidget перенесено в отдельный файл
This commit is contained in:
parent
945ce45621
commit
c4bc353032
102
params/plot_structure_params.json
Normal file
102
params/plot_structure_params.json
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"Electrode Force, N & Welding Current, kA": {
|
||||||
|
"Settings": {
|
||||||
|
"zoom": false,
|
||||||
|
"stages": true,
|
||||||
|
"performance": true,
|
||||||
|
"ideals": true,
|
||||||
|
"mirror ME": false,
|
||||||
|
"workpiece": false,
|
||||||
|
"force compensation FE": false,
|
||||||
|
"force accuracy":true
|
||||||
|
},
|
||||||
|
"Real_signals": [
|
||||||
|
{
|
||||||
|
"name": "Electrode Force, N ME",
|
||||||
|
"pen": "r"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Electrode Force, N FE",
|
||||||
|
"pen": "w"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Ideal_signals": [
|
||||||
|
{
|
||||||
|
"name": "Force",
|
||||||
|
"pen": {"color": "g", "width":3}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"Electrode Position, mm": {
|
||||||
|
"Settings": {
|
||||||
|
"zoom": false,
|
||||||
|
"stages": true,
|
||||||
|
"performance": false,
|
||||||
|
"ideals": true,
|
||||||
|
"mirror ME": true,
|
||||||
|
"workpiece": true,
|
||||||
|
"force compensation FE": true,
|
||||||
|
"force accuracy":false
|
||||||
|
},
|
||||||
|
"Real_signals": [
|
||||||
|
{
|
||||||
|
"name": "Rotor Position, mm ME",
|
||||||
|
"pen": {"color": "r", "width":2}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rotor Position, mm FE",
|
||||||
|
"pen": {"color": "w", "width":2}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Ideal_signals": [
|
||||||
|
{
|
||||||
|
"name": "Position ME",
|
||||||
|
"pen": {"color": "g", "width":4}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Position FE",
|
||||||
|
"pen": {"color": "b", "width":4}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"Electrode Speed, mm/s": {
|
||||||
|
"Settings": {
|
||||||
|
"zoom": false,
|
||||||
|
"stages": true,
|
||||||
|
"performance": false,
|
||||||
|
"ideals": true,
|
||||||
|
"mirror ME": false,
|
||||||
|
"workpiece": false,
|
||||||
|
"force compensation FE": false,
|
||||||
|
"force accuracy":false
|
||||||
|
},
|
||||||
|
"Real_signals": [
|
||||||
|
{
|
||||||
|
"name": "Rotor Speed, mm/s ME",
|
||||||
|
"pen": "r",
|
||||||
|
"zoom": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rotor Speed, mm/s FE",
|
||||||
|
"pen": "w",
|
||||||
|
"zoom": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Ideal_signals": [
|
||||||
|
{
|
||||||
|
"name": "Rotor Speed ME",
|
||||||
|
"pen": {"color": "g", "width":3},
|
||||||
|
"zoom": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Rotor Speed FE",
|
||||||
|
"pen": {"color": "b", "width":3},
|
||||||
|
"zoom": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
103
src/base/base.py
103
src/base/base.py
@ -189,108 +189,7 @@ class BasePlotWidget:
|
|||||||
"Relief": [34, 139, 34, 100], # Forest Green
|
"Relief": [34, 139, 34, 100], # Forest Green
|
||||||
"Oncomming": [255, 165, 0, 100] # Orange
|
"Oncomming": [255, 165, 0, 100] # Orange
|
||||||
}
|
}
|
||||||
self._plt_channels = {
|
self._plt_channels = None
|
||||||
"Electrode Force, N & Welding Current, kA": {
|
|
||||||
"Settings": {
|
|
||||||
"zoom": False,
|
|
||||||
"stages": True,
|
|
||||||
"performance": True,
|
|
||||||
"ideals": True,
|
|
||||||
"mirror ME": False,
|
|
||||||
"workpiece": False,
|
|
||||||
"force compensation FE": False,
|
|
||||||
"force accuracy":True
|
|
||||||
},
|
|
||||||
"Real_signals": [
|
|
||||||
{
|
|
||||||
"name": "Electrode Force, N ME",
|
|
||||||
"pen": 'r',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Electrode Force, N FE",
|
|
||||||
"pen": 'w',
|
|
||||||
},
|
|
||||||
#{
|
|
||||||
# "name": "Welding Current ME",
|
|
||||||
# "pen": "y",
|
|
||||||
#}
|
|
||||||
],
|
|
||||||
"Ideal_signals": [
|
|
||||||
{
|
|
||||||
"name": "Force",
|
|
||||||
"pen": {'color': 'g', 'width':3},
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Electrode Position, mm": {
|
|
||||||
"Settings": {
|
|
||||||
"zoom": False,
|
|
||||||
"stages": True,
|
|
||||||
"performance": False,
|
|
||||||
"ideals": True,
|
|
||||||
"mirror ME": True,
|
|
||||||
"workpiece": True,
|
|
||||||
"force compensation FE": True,
|
|
||||||
"force accuracy":False
|
|
||||||
},
|
|
||||||
"Real_signals": [
|
|
||||||
{
|
|
||||||
"name": "Rotor Position, mm ME",
|
|
||||||
"pen": {'color': 'r', 'width':2},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Rotor Position, mm FE",
|
|
||||||
"pen": {'color': 'w', 'width':2},
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Ideal_signals": [
|
|
||||||
{
|
|
||||||
"name": "Position ME",
|
|
||||||
"pen": {'color': 'g', 'width':4},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Position FE",
|
|
||||||
"pen": {'color': 'b', 'width':4},
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Electrode Speed, mm/s": {
|
|
||||||
"Settings": {
|
|
||||||
"zoom": False,
|
|
||||||
"stages": True,
|
|
||||||
"performance": False,
|
|
||||||
"ideals": True,
|
|
||||||
"mirror ME": False,
|
|
||||||
"workpiece": False,
|
|
||||||
"force compensation FE": False,
|
|
||||||
"force accuracy":False
|
|
||||||
},
|
|
||||||
"Real_signals": [
|
|
||||||
{
|
|
||||||
"name": "Rotor Speed, mm/s ME",
|
|
||||||
"pen": 'r',
|
|
||||||
"zoom": False
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Rotor Speed, mm/s FE",
|
|
||||||
"pen": 'w',
|
|
||||||
"zoom": False
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Ideal_signals": [
|
|
||||||
{
|
|
||||||
"name": "Rotor Speed ME",
|
|
||||||
"pen": {'color': 'g', 'width':3},
|
|
||||||
"zoom": False
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Rotor Speed FE",
|
|
||||||
"pen": {'color': 'b', 'width':3},
|
|
||||||
"zoom": False
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def set_style(object_: Union[QTabWidget, QWidget]) -> None:
|
def set_style(object_: Union[QTabWidget, QWidget]) -> None:
|
||||||
|
|||||||
@ -18,7 +18,8 @@ from loguru import logger
|
|||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from base.base import BasePlotWidget, GraphicPassport, PlotItems, PointPassport, UsefulGraphData
|
from base.base import BasePlotWidget, GraphicPassport, PlotItems, PointPassport, UsefulGraphData, BaseController
|
||||||
|
from utils.json_tools import read_json
|
||||||
from utils import qt_settings as qts
|
from utils import qt_settings as qts
|
||||||
|
|
||||||
|
|
||||||
@ -36,6 +37,10 @@ class ChannelTimings():
|
|||||||
|
|
||||||
class PlotWidget(BasePlotWidget):
|
class PlotWidget(BasePlotWidget):
|
||||||
|
|
||||||
|
def __init__(self, controller:BaseController):
|
||||||
|
super().__init__(controller=controller)
|
||||||
|
self._plt_channels = read_json("params/plot_structure_params.json")
|
||||||
|
|
||||||
def build(self, data: list[GraphicPassport]) -> None:
|
def build(self, data: list[GraphicPassport]) -> None:
|
||||||
"""
|
"""
|
||||||
Создает набор виджетов по предоставленному списку данных.
|
Создает набор виджетов по предоставленному списку данных.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user