Compare commits
No commits in common. "c8b2d1539f0c3af9fb7980388fdd2f66c52a4c8d" and "180b9f0a713e72310e2c52ec1b404b267fd21b26" have entirely different histories.
c8b2d1539f
...
180b9f0a71
@ -41,12 +41,6 @@ class PlotWidget(BasePlotWidget):
|
||||
legend.setParentItem(plot_widget.graphicsItem())
|
||||
return plot_widget, legend
|
||||
|
||||
@staticmethod
|
||||
def _find_max_arg_index(signal: pd.Series):
|
||||
max_index = np.argmax(signal)
|
||||
start = max_index + 20
|
||||
return start
|
||||
|
||||
def get_stage_info(self,
|
||||
stage: str,
|
||||
dataframe: pd.DataFrame,
|
||||
@ -111,17 +105,15 @@ class PlotWidget(BasePlotWidget):
|
||||
plot_widget.setYRange(mean - 260, mean + 260)
|
||||
plot_widget.setInteractive(False)
|
||||
else:
|
||||
i_list = [self._find_max_arg_index(dataframe[signal["name"]]) for signal in description["Signals"]]
|
||||
mean_i = np.mean(i_list)
|
||||
x = time_axis[int(mean_i)]
|
||||
y = np.mean([dataframe[signal["name"]][int(mean_i)] for signal in description["Signals"]])
|
||||
region = pg.LinearRegionItem([y - y * 0.015,
|
||||
y + y * 0.015],
|
||||
max_value = min([max(dataframe[signal["name"]]) for signal in description["Signals"]])
|
||||
region = pg.LinearRegionItem([max_value - max_value * 0.015,
|
||||
max_value + max_value * 0.015],
|
||||
movable=False,
|
||||
orientation="horizontal")
|
||||
|
||||
region.setBrush(pg.mkBrush([0, 250, 0, 100]))
|
||||
plot_widget.setYRange(y - 200, y + 200)
|
||||
plot_widget.setXRange(x, x + 0.5)
|
||||
plot_widget.setYRange(max_value - 200, max_value + 200)
|
||||
plot_widget.setXRange(3.5, 4.5)
|
||||
plot_widget.addItem(region)
|
||||
plot_widget.setInteractive(False)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user