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

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 

5 

6 

7class ProcessingController: 

8 """現在のデータセット(または選択中の複数)から新しいデータセットを作る、または行を除外する処理。""" 

9 

10 def __init__(self, host): 

11 self._host = host 

12 self._state = OperationState() 

13 

14 @property 

15 def integral_result_dialog(self): 

16 return self._state.result_windows.get(INTEGRAL_RESULT_WINDOW) 

17 

18 @property 

19 def outlier_result_dialog(self): 

20 return self._state.result_windows.get(OUTLIER_RESULT_WINDOW) 

21 

22 def _run(self, name): 

23 run_operation(PROCESSING_OPERATIONS[name], self._host, self._state) 

24 

25 def arithmetic(self): 

26 self._run("arithmetic") 

27 

28 def align_selected(self): 

29 self._run("align") 

30 

31 def mean_and_sd_of_selected(self): 

32 self._run("mean_and_sd") 

33 

34 def normalize(self): 

35 self._run("normalize") 

36 

37 def savgol_smooth(self): 

38 self._run("savgol_smooth") 

39 

40 def baseline_correction(self): 

41 self._run("baseline_correction") 

42 

43 def interval_integral(self): 

44 self._run("interval_integral") 

45 

46 def cumulative_integral(self): 

47 self._run("cumulative_integral") 

48 

49 def split_by_column(self): 

50 self._run("split_by_column") 

51 

52 def resample(self): 

53 self._run("resample") 

54 

55 def histogram_or_kde(self): 

56 self._run("histogram_or_kde") 

57 

58 def detect_duplicate_x(self): 

59 self._run("detect_duplicate_x") 

60 

61 def filter_rows(self): 

62 self._run("filter_rows") 

63 

64 def detect_outliers(self): 

65 self._run("detect_outliers") 

66 

67 def batch_column_calculate(self): 

68 self._run("batch_column_calculate")