chore: изменил смещение от максимума функции
This commit is contained in:
parent
efbdb8ca19
commit
c8b2d1539f
@ -41,9 +41,10 @@ class PlotWidget(BasePlotWidget):
|
|||||||
legend.setParentItem(plot_widget.graphicsItem())
|
legend.setParentItem(plot_widget.graphicsItem())
|
||||||
return plot_widget, legend
|
return plot_widget, legend
|
||||||
|
|
||||||
def _find_linear_stage(self, signal: pd.Series):
|
@staticmethod
|
||||||
|
def _find_max_arg_index(signal: pd.Series):
|
||||||
max_index = np.argmax(signal)
|
max_index = np.argmax(signal)
|
||||||
start = max_index + 10
|
start = max_index + 20
|
||||||
return start
|
return start
|
||||||
|
|
||||||
def get_stage_info(self,
|
def get_stage_info(self,
|
||||||
@ -110,7 +111,7 @@ class PlotWidget(BasePlotWidget):
|
|||||||
plot_widget.setYRange(mean - 260, mean + 260)
|
plot_widget.setYRange(mean - 260, mean + 260)
|
||||||
plot_widget.setInteractive(False)
|
plot_widget.setInteractive(False)
|
||||||
else:
|
else:
|
||||||
i_list = [self._find_linear_stage(dataframe[signal["name"]]) for signal in description["Signals"]]
|
i_list = [self._find_max_arg_index(dataframe[signal["name"]]) for signal in description["Signals"]]
|
||||||
mean_i = np.mean(i_list)
|
mean_i = np.mean(i_list)
|
||||||
x = time_axis[int(mean_i)]
|
x = time_axis[int(mean_i)]
|
||||||
y = np.mean([dataframe[signal["name"]][int(mean_i)] for signal in description["Signals"]])
|
y = np.mean([dataframe[signal["name"]][int(mean_i)] for signal in description["Signals"]])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user