Coverage for graphica/gui/datasets/processing.py: 100.0%
44 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-12 16:38 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-12 16:38 +0000
1"""データセットのデータ処理のメニューの入口。本体は gui/datasets/operations/processing.py の操作の表。"""
2from graphica.gui.datasets.operations.processing import (INTEGRAL_RESULT_WINDOW, OUTLIER_RESULT_WINDOW,
3 PROCESSING_OPERATIONS)
4from graphica.gui.datasets.operations.runner import OperationState, run_operation
7class ProcessingController:
8 """現在のデータセット(または選択中の複数)から新しいデータセットを作る、または行を除外する処理。"""
10 def __init__(self, host):
11 self._host = host
12 self._state = OperationState()
14 @property
15 def integral_result_dialog(self):
16 return self._state.result_windows.get(INTEGRAL_RESULT_WINDOW)
18 @property
19 def outlier_result_dialog(self):
20 return self._state.result_windows.get(OUTLIER_RESULT_WINDOW)
22 def _run(self, name):
23 run_operation(PROCESSING_OPERATIONS[name], self._host, self._state)
25 def arithmetic(self):
26 self._run("arithmetic")
28 def align_selected(self):
29 self._run("align")
31 def mean_and_sd_of_selected(self):
32 self._run("mean_and_sd")
34 def normalize(self):
35 self._run("normalize")
37 def savgol_smooth(self):
38 self._run("savgol_smooth")
40 def baseline_correction(self):
41 self._run("baseline_correction")
43 def interval_integral(self):
44 self._run("interval_integral")
46 def cumulative_integral(self):
47 self._run("cumulative_integral")
49 def split_by_column(self):
50 self._run("split_by_column")
52 def resample(self):
53 self._run("resample")
55 def histogram_or_kde(self):
56 self._run("histogram_or_kde")
58 def detect_duplicate_x(self):
59 self._run("detect_duplicate_x")
61 def filter_rows(self):
62 self._run("filter_rows")
64 def detect_outliers(self):
65 self._run("detect_outliers")
67 def batch_column_calculate(self):
68 self._run("batch_column_calculate")