accusleepy 0.7.2__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {accusleepy-0.7.2 → accusleepy-0.8.0}/PKG-INFO +9 -5
  2. {accusleepy-0.7.2 → accusleepy-0.8.0}/README.md +6 -2
  3. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/config.json +3 -1
  4. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/constants.py +5 -0
  5. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/fileio.py +20 -2
  6. accusleepy-0.8.0/accusleepy/gui/images/primary_window.png +0 -0
  7. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/main.py +11 -0
  8. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/manual_scoring.py +16 -5
  9. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/primary_window.py +149 -31
  10. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/primary_window.ui +298 -183
  11. accusleepy-0.8.0/accusleepy/gui/text/dev_guide.md +57 -0
  12. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/viewer_window.py +5 -11
  13. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/viewer_window.ui +3 -0
  14. {accusleepy-0.7.2 → accusleepy-0.8.0}/pyproject.toml +2 -2
  15. accusleepy-0.7.2/accusleepy/gui/images/primary_window.png +0 -0
  16. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/__init__.py +0 -0
  17. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/__main__.py +0 -0
  18. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/bouts.py +0 -0
  19. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/brain_state_set.py +0 -0
  20. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/classification.py +0 -0
  21. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/__init__.py +0 -0
  22. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/brightness_down.png +0 -0
  23. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/brightness_up.png +0 -0
  24. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/double_down_arrow.png +0 -0
  25. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/double_up_arrow.png +0 -0
  26. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/down_arrow.png +0 -0
  27. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/home.png +0 -0
  28. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/question.png +0 -0
  29. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/save.png +0 -0
  30. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/up_arrow.png +0 -0
  31. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/zoom_in.png +0 -0
  32. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/icons/zoom_out.png +0 -0
  33. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/images/viewer_window.png +0 -0
  34. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/images/viewer_window_annotated.png +0 -0
  35. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/mplwidget.py +0 -0
  36. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/resources.qrc +0 -0
  37. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/resources_rc.py +0 -0
  38. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/text/main_guide.md +0 -0
  39. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/gui/text/manual_scoring_guide.md +0 -0
  40. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/models.py +0 -0
  41. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/multitaper.py +0 -0
  42. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/signal_processing.py +0 -0
  43. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/temperature_scaling.py +0 -0
  44. {accusleepy-0.7.2 → accusleepy-0.8.0}/accusleepy/validation.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: accusleepy
3
- Version: 0.7.2
3
+ Version: 0.8.0
4
4
  Summary: Python implementation of AccuSleep
5
5
  License: GPL-3.0-only
6
6
  Author: Zeke Barger
@@ -18,7 +18,7 @@ Requires-Dist: numpy (>=2.2.4,<3.0.0)
18
18
  Requires-Dist: pandas (>=2.2.3,<3.0.0)
19
19
  Requires-Dist: pillow (>=11.1.0,<12.0.0)
20
20
  Requires-Dist: pre-commit (>=4.2.0,<5.0.0)
21
- Requires-Dist: pyside6 (==6.9.0)
21
+ Requires-Dist: pyside6 (>=6.9.0,<6.9.3)
22
22
  Requires-Dist: scipy (>=1.15.2,<2.0.0)
23
23
  Requires-Dist: toml (>=0.10.2,<0.11.0)
24
24
  Requires-Dist: torch (>=2.8.0,<3.0.0)
@@ -74,10 +74,14 @@ to the [config file](accusleepy/config.json).
74
74
 
75
75
  [Guide to the manual scoring interface](accusleepy/gui/text/manual_scoring_guide.md)
76
76
 
77
+ ## Developer guide
78
+ If you want to contribute to the project or modify the code for your own use,
79
+ please consult the [developer guide](accusleepy/gui/text/dev_guide.md).
80
+
77
81
  ## Changelog
78
82
 
79
- - 0.7.2: Address issues with certain dependencies
80
- - 0.7.1: Bugfixes, code cleanup
83
+ - 0.8.0: More configurable settings, visual improvements
84
+ - 0.7.1-0.7.3: Bugfixes, code cleanup
81
85
  - 0.7.0: More settings can be configured in the UI
82
86
  - 0.6.0: Confidence scores can now be displayed and saved. Retraining your models is recommended
83
87
  since the new calibration feature will make the confidence scores more accurate.
@@ -46,10 +46,14 @@ to the [config file](accusleepy/config.json).
46
46
 
47
47
  [Guide to the manual scoring interface](accusleepy/gui/text/manual_scoring_guide.md)
48
48
 
49
+ ## Developer guide
50
+ If you want to contribute to the project or modify the code for your own use,
51
+ please consult the [developer guide](accusleepy/gui/text/dev_guide.md).
52
+
49
53
  ## Changelog
50
54
 
51
- - 0.7.2: Address issues with certain dependencies
52
- - 0.7.1: Bugfixes, code cleanup
55
+ - 0.8.0: More configurable settings, visual improvements
56
+ - 0.7.1-0.7.3: Bugfixes, code cleanup
53
57
  - 0.7.0: More settings can be configured in the UI
54
58
  - 0.6.0: Confidence scores can now be displayed and saved. Retraining your models is recommended
55
59
  since the new calibration feature will make the confidence scores more accurate.
@@ -33,5 +33,7 @@
33
33
  "learning_rate": 0.001,
34
34
  "momentum": 0.9,
35
35
  "training_epochs": 6
36
- }
36
+ },
37
+ "epochs_to_show": 5,
38
+ "autoscroll_state": false
37
39
  }
@@ -67,6 +67,8 @@ DEFAULT_OVERWRITE_KEY = "default_overwrite_setting"
67
67
  EMG_FILTER_KEY = "emg_filter"
68
68
  # model training hyperparameters key
69
69
  HYPERPARAMETERS_KEY = "hyperparameters"
70
+ EPOCHS_TO_SHOW_KEY = "epochs_to_show"
71
+ AUTOSCROLL_KEY = "autoscroll_state"
70
72
 
71
73
  # default values
72
74
  # default UI settings
@@ -82,3 +84,6 @@ DEFAULT_BATCH_SIZE = 64
82
84
  DEFAULT_LEARNING_RATE = 1e-3
83
85
  DEFAULT_MOMENTUM = 0.9
84
86
  DEFAULT_TRAINING_EPOCHS = 6
87
+ # default manual scoring settings
88
+ DEFAULT_EPOCHS_TO_SHOW = 5
89
+ DEFAULT_AUTOSCROLL_STATE = False
@@ -112,7 +112,15 @@ def save_labels(
112
112
 
113
113
 
114
114
  def load_config() -> tuple[
115
- BrainStateSet, int | float, bool, bool, int | float, EMGFilter, Hyperparameters
115
+ BrainStateSet,
116
+ int | float,
117
+ bool,
118
+ bool,
119
+ int | float,
120
+ EMGFilter,
121
+ Hyperparameters,
122
+ int,
123
+ bool,
116
124
  ]:
117
125
  """Load configuration file with brain state options
118
126
 
@@ -122,7 +130,9 @@ def load_config() -> tuple[
122
130
  default confidence score output setting,
123
131
  default minimum bout length,
124
132
  EMG filter parameters,
125
- model training hyperparameters
133
+ model training hyperparameters,
134
+ default epochs to show for manual scoring,
135
+ default autoscroll state for manual scoring
126
136
  """
127
137
  with open(
128
138
  os.path.join(os.path.dirname(os.path.abspath(__file__)), c.CONFIG_FILE), "r"
@@ -158,6 +168,8 @@ def load_config() -> tuple[
158
168
  },
159
169
  )
160
170
  ),
171
+ data.get(c.EPOCHS_TO_SHOW_KEY, c.DEFAULT_EPOCHS_TO_SHOW),
172
+ data.get(c.AUTOSCROLL_KEY, c.DEFAULT_AUTOSCROLL_STATE),
161
173
  )
162
174
 
163
175
 
@@ -169,6 +181,8 @@ def save_config(
169
181
  min_bout_length: int | float,
170
182
  emg_filter: EMGFilter,
171
183
  hyperparameters: Hyperparameters,
184
+ epochs_to_show: int,
185
+ autoscroll_state: bool,
172
186
  ) -> None:
173
187
  """Save configuration of brain state options to json file
174
188
 
@@ -181,6 +195,8 @@ def save_config(
181
195
  :param overwrite_setting: default setting for overwriting
182
196
  existing labels
183
197
  :param hyperparameters: model training hyperparameters
198
+ :param epochs_to_show: default epochs to show for manual scoring,
199
+ :param autoscroll_state: default autoscroll state for manual scoring
184
200
  """
185
201
  output_dict = brain_state_set.to_output_dict()
186
202
  output_dict.update({c.DEFAULT_EPOCH_LENGTH_KEY: default_epoch_length})
@@ -189,6 +205,8 @@ def save_config(
189
205
  output_dict.update({c.DEFAULT_MIN_BOUT_LENGTH_KEY: min_bout_length})
190
206
  output_dict.update({c.EMG_FILTER_KEY: emg_filter.__dict__})
191
207
  output_dict.update({c.HYPERPARAMETERS_KEY: hyperparameters.__dict__})
208
+ output_dict.update({c.EPOCHS_TO_SHOW_KEY: epochs_to_show})
209
+ output_dict.update({c.AUTOSCROLL_KEY: autoscroll_state})
192
210
  with open(
193
211
  os.path.join(os.path.dirname(os.path.abspath(__file__)), c.CONFIG_FILE), "w"
194
212
  ) as f:
@@ -81,6 +81,11 @@ from accusleepy.validation import (
81
81
 
82
82
  # note: functions using torch or scipy are lazily imported
83
83
 
84
+ # on Windows, prevent dark mode from changing the visual style
85
+ if os.name == "nt":
86
+ sys.argv += ["-platform", "windows:darkmode=0"]
87
+
88
+
84
89
  # relative path to user manual
85
90
  MAIN_GUIDE_FILE = os.path.normpath(r"text/main_guide.md")
86
91
 
@@ -116,6 +121,8 @@ class AccuSleepWindow(QMainWindow):
116
121
  self.min_bout_length,
117
122
  self.emg_filter,
118
123
  self.hyperparameters,
124
+ self.default_epochs_to_show,
125
+ self.default_autoscroll_state,
119
126
  ) = load_config()
120
127
 
121
128
  self.settings_widgets = None
@@ -1238,6 +1245,8 @@ class AccuSleepWindow(QMainWindow):
1238
1245
  self.ui.overwrite_default_checkbox.setChecked(self.only_overwrite_undefined)
1239
1246
  self.ui.confidence_setting_checkbox.setChecked(self.save_confidence_scores)
1240
1247
  self.ui.default_min_bout_length_spinbox.setValue(self.min_bout_length)
1248
+ self.ui.epochs_to_show_spinbox.setValue(self.default_epochs_to_show)
1249
+ self.ui.autoscroll_checkbox.setChecked(self.default_autoscroll_state)
1241
1250
  # EMG filter
1242
1251
  self.ui.emg_order_spinbox.setValue(self.emg_filter.order)
1243
1252
  self.ui.bp_lower_spinbox.setValue(self.emg_filter.bp_lower)
@@ -1439,6 +1448,8 @@ class AccuSleepWindow(QMainWindow):
1439
1448
  momentum=self.hyperparameters.momentum,
1440
1449
  training_epochs=self.hyperparameters.training_epochs,
1441
1450
  ),
1451
+ epochs_to_show=self.ui.epochs_to_show_spinbox.value(),
1452
+ autoscroll_state=self.ui.autoscroll_checkbox.isChecked(),
1442
1453
  )
1443
1454
  self.ui.save_config_status.setText("configuration saved")
1444
1455
 
@@ -140,10 +140,17 @@ class ManualScoringWindow(QDialog):
140
140
  self.setWindowTitle("AccuSleePy manual scoring window")
141
141
 
142
142
  # load set of valid brain states
143
- self.brain_state_set, _, _, _, _, _, _ = load_config()
144
-
145
- # initial setting for number of epochs to show in the lower plot
146
- self.epochs_to_show = 5
143
+ (
144
+ self.brain_state_set,
145
+ _,
146
+ _,
147
+ _,
148
+ _,
149
+ _,
150
+ _,
151
+ self.epochs_to_show,
152
+ self.autoscroll_state,
153
+ ) = load_config()
147
154
 
148
155
  # find the set of y-axis locations of valid brain state labels
149
156
  self.label_display_options = convert_labels(
@@ -216,7 +223,11 @@ class ManualScoringWindow(QDialog):
216
223
  self.emg_signal_offset = 0
217
224
  self.roi_brain_state = 0
218
225
  self.label_roi_mode = False
219
- self.autoscroll_state = False
226
+
227
+ # set autoscroll state and epochs to show, based on defaults
228
+ self.ui.autoscroll.setChecked(self.autoscroll_state)
229
+ self.ui.shownepochslabel.setText(str(self.epochs_to_show))
230
+
220
231
  # keep track of save state to warn user when they quit
221
232
  self.last_saved_labels = copy.deepcopy(self.labels)
222
233
 
@@ -3,25 +3,13 @@
3
3
  ################################################################################
4
4
  ## Form generated from reading UI file 'primary_window.ui'
5
5
  ##
6
- ## Created by: Qt User Interface Compiler version 6.9.1
6
+ ## Created by: Qt User Interface Compiler version 6.9.0
7
7
  ##
8
8
  ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
9
  ################################################################################
10
10
 
11
- from PySide6.QtCore import (
12
- QCoreApplication,
13
- QMetaObject,
14
- QRect,
15
- QSize,
16
- Qt,
17
- )
18
- from PySide6.QtGui import (
19
- QBrush,
20
- QColor,
21
- QFont,
22
- QIcon,
23
- QPalette,
24
- )
11
+ from PySide6.QtCore import QCoreApplication, QMetaObject, QRect, QSize, Qt
12
+ from PySide6.QtGui import QBrush, QColor, QFont, QIcon, QPalette
25
13
  from PySide6.QtWidgets import (
26
14
  QCheckBox,
27
15
  QComboBox,
@@ -676,7 +664,6 @@ class Ui_PrimaryWindow(object):
676
664
  self.overwritecheckbox.sizePolicy().hasHeightForWidth()
677
665
  )
678
666
  self.overwritecheckbox.setSizePolicy(sizePolicy1)
679
- self.overwritecheckbox.setStyleSheet("background-color: transparent;")
680
667
 
681
668
  self.classification_options_layout.addWidget(self.overwritecheckbox)
682
669
 
@@ -692,7 +679,6 @@ class Ui_PrimaryWindow(object):
692
679
  self.save_confidence_checkbox.sizePolicy().hasHeightForWidth()
693
680
  )
694
681
  self.save_confidence_checkbox.setSizePolicy(sizePolicy1)
695
- self.save_confidence_checkbox.setStyleSheet("background-color: transparent;")
696
682
 
697
683
  self.classification_options_layout.addWidget(self.save_confidence_checkbox)
698
684
 
@@ -2238,20 +2224,25 @@ class Ui_PrimaryWindow(object):
2238
2224
  self.horizontalLayout_81.setSpacing(20)
2239
2225
  self.horizontalLayout_81.setObjectName("horizontalLayout_81")
2240
2226
  self.verticalLayout_6 = QVBoxLayout()
2241
- self.verticalLayout_6.setSpacing(10)
2227
+ self.verticalLayout_6.setSpacing(20)
2242
2228
  self.verticalLayout_6.setObjectName("verticalLayout_6")
2229
+ self.primary_defaults_groupbox = QGroupBox(self.ui_default_page)
2230
+ self.primary_defaults_groupbox.setObjectName("primary_defaults_groupbox")
2231
+ self.verticalLayout_4 = QVBoxLayout(self.primary_defaults_groupbox)
2232
+ self.verticalLayout_4.setSpacing(10)
2233
+ self.verticalLayout_4.setObjectName("verticalLayout_4")
2243
2234
  self.default_epoch_layout = QHBoxLayout()
2244
2235
  self.default_epoch_layout.setObjectName("default_epoch_layout")
2245
2236
  self.horizontalLayout_60 = QHBoxLayout()
2246
2237
  self.horizontalLayout_60.setObjectName("horizontalLayout_60")
2247
- self.label_17 = QLabel(self.ui_default_page)
2238
+ self.label_17 = QLabel(self.primary_defaults_groupbox)
2248
2239
  self.label_17.setObjectName("label_17")
2249
2240
  sizePolicy1.setHeightForWidth(self.label_17.sizePolicy().hasHeightForWidth())
2250
2241
  self.label_17.setSizePolicy(sizePolicy1)
2251
2242
 
2252
2243
  self.horizontalLayout_60.addWidget(self.label_17)
2253
2244
 
2254
- self.default_epoch_input = QDoubleSpinBox(self.ui_default_page)
2245
+ self.default_epoch_input = QDoubleSpinBox(self.primary_defaults_groupbox)
2255
2246
  self.default_epoch_input.setObjectName("default_epoch_input")
2256
2247
  sizePolicy1.setHeightForWidth(
2257
2248
  self.default_epoch_input.sizePolicy().hasHeightForWidth()
@@ -2270,13 +2261,13 @@ class Ui_PrimaryWindow(object):
2270
2261
 
2271
2262
  self.default_epoch_layout.addItem(self.horizontalSpacer_70)
2272
2263
 
2273
- self.verticalLayout_6.addLayout(self.default_epoch_layout)
2264
+ self.verticalLayout_4.addLayout(self.default_epoch_layout)
2274
2265
 
2275
2266
  self.horizontalLayout_75 = QHBoxLayout()
2276
2267
  self.horizontalLayout_75.setObjectName("horizontalLayout_75")
2277
2268
  self.horizontalLayout_76 = QHBoxLayout()
2278
2269
  self.horizontalLayout_76.setObjectName("horizontalLayout_76")
2279
- self.overwrite_default_checkbox = QCheckBox(self.ui_default_page)
2270
+ self.overwrite_default_checkbox = QCheckBox(self.primary_defaults_groupbox)
2280
2271
  self.overwrite_default_checkbox.setObjectName("overwrite_default_checkbox")
2281
2272
 
2282
2273
  self.horizontalLayout_76.addWidget(self.overwrite_default_checkbox)
@@ -2289,7 +2280,7 @@ class Ui_PrimaryWindow(object):
2289
2280
 
2290
2281
  self.horizontalLayout_75.addItem(self.horizontalSpacer_88)
2291
2282
 
2292
- self.verticalLayout_6.addLayout(self.horizontalLayout_75)
2283
+ self.verticalLayout_4.addLayout(self.horizontalLayout_75)
2293
2284
 
2294
2285
  self.confidence_score_setting_layout = QHBoxLayout()
2295
2286
  self.confidence_score_setting_layout.setObjectName(
@@ -2297,7 +2288,7 @@ class Ui_PrimaryWindow(object):
2297
2288
  )
2298
2289
  self.horizontalLayout_62 = QHBoxLayout()
2299
2290
  self.horizontalLayout_62.setObjectName("horizontalLayout_62")
2300
- self.confidence_setting_checkbox = QCheckBox(self.ui_default_page)
2291
+ self.confidence_setting_checkbox = QCheckBox(self.primary_defaults_groupbox)
2301
2292
  self.confidence_setting_checkbox.setObjectName("confidence_setting_checkbox")
2302
2293
  sizePolicy1.setHeightForWidth(
2303
2294
  self.confidence_setting_checkbox.sizePolicy().hasHeightForWidth()
@@ -2315,20 +2306,22 @@ class Ui_PrimaryWindow(object):
2315
2306
 
2316
2307
  self.confidence_score_setting_layout.addItem(self.horizontalSpacer_72)
2317
2308
 
2318
- self.verticalLayout_6.addLayout(self.confidence_score_setting_layout)
2309
+ self.verticalLayout_4.addLayout(self.confidence_score_setting_layout)
2319
2310
 
2320
2311
  self.horizontalLayout_2 = QHBoxLayout()
2321
2312
  self.horizontalLayout_2.setObjectName("horizontalLayout_2")
2322
2313
  self.horizontalLayout_18 = QHBoxLayout()
2323
2314
  self.horizontalLayout_18.setObjectName("horizontalLayout_18")
2324
- self.label_19 = QLabel(self.ui_default_page)
2315
+ self.label_19 = QLabel(self.primary_defaults_groupbox)
2325
2316
  self.label_19.setObjectName("label_19")
2326
2317
  sizePolicy1.setHeightForWidth(self.label_19.sizePolicy().hasHeightForWidth())
2327
2318
  self.label_19.setSizePolicy(sizePolicy1)
2328
2319
 
2329
2320
  self.horizontalLayout_18.addWidget(self.label_19)
2330
2321
 
2331
- self.default_min_bout_length_spinbox = QDoubleSpinBox(self.ui_default_page)
2322
+ self.default_min_bout_length_spinbox = QDoubleSpinBox(
2323
+ self.primary_defaults_groupbox
2324
+ )
2332
2325
  self.default_min_bout_length_spinbox.setObjectName(
2333
2326
  "default_min_bout_length_spinbox"
2334
2327
  )
@@ -2349,7 +2342,68 @@ class Ui_PrimaryWindow(object):
2349
2342
 
2350
2343
  self.horizontalLayout_2.addItem(self.horizontalSpacer_90)
2351
2344
 
2352
- self.verticalLayout_6.addLayout(self.horizontalLayout_2)
2345
+ self.verticalLayout_4.addLayout(self.horizontalLayout_2)
2346
+
2347
+ self.verticalLayout_6.addWidget(self.primary_defaults_groupbox)
2348
+
2349
+ self.manual_defaults_groupbox = QGroupBox(self.ui_default_page)
2350
+ self.manual_defaults_groupbox.setObjectName("manual_defaults_groupbox")
2351
+ self.verticalLayout_7 = QVBoxLayout(self.manual_defaults_groupbox)
2352
+ self.verticalLayout_7.setSpacing(10)
2353
+ self.verticalLayout_7.setObjectName("verticalLayout_7")
2354
+ self.epochs_to_show_layout = QHBoxLayout()
2355
+ self.epochs_to_show_layout.setObjectName("epochs_to_show_layout")
2356
+ self.horizontalLayout_78 = QHBoxLayout()
2357
+ self.horizontalLayout_78.setObjectName("horizontalLayout_78")
2358
+ self.label_20 = QLabel(self.manual_defaults_groupbox)
2359
+ self.label_20.setObjectName("label_20")
2360
+ sizePolicy1.setHeightForWidth(self.label_20.sizePolicy().hasHeightForWidth())
2361
+ self.label_20.setSizePolicy(sizePolicy1)
2362
+
2363
+ self.horizontalLayout_78.addWidget(self.label_20)
2364
+
2365
+ self.epochs_to_show_spinbox = QSpinBox(self.manual_defaults_groupbox)
2366
+ self.epochs_to_show_spinbox.setObjectName("epochs_to_show_spinbox")
2367
+ self.epochs_to_show_spinbox.setMinimum(3)
2368
+ self.epochs_to_show_spinbox.setSingleStep(2)
2369
+ self.epochs_to_show_spinbox.setValue(5)
2370
+
2371
+ self.horizontalLayout_78.addWidget(self.epochs_to_show_spinbox)
2372
+
2373
+ self.epochs_to_show_layout.addLayout(self.horizontalLayout_78)
2374
+
2375
+ self.horizontalSpacer_92 = QSpacerItem(
2376
+ 40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
2377
+ )
2378
+
2379
+ self.epochs_to_show_layout.addItem(self.horizontalSpacer_92)
2380
+
2381
+ self.verticalLayout_7.addLayout(self.epochs_to_show_layout)
2382
+
2383
+ self.autoscroll_layout = QHBoxLayout()
2384
+ self.autoscroll_layout.setObjectName("autoscroll_layout")
2385
+ self.horizontalLayout_77 = QHBoxLayout()
2386
+ self.horizontalLayout_77.setObjectName("horizontalLayout_77")
2387
+ self.autoscroll_checkbox = QCheckBox(self.manual_defaults_groupbox)
2388
+ self.autoscroll_checkbox.setObjectName("autoscroll_checkbox")
2389
+ sizePolicy1.setHeightForWidth(
2390
+ self.autoscroll_checkbox.sizePolicy().hasHeightForWidth()
2391
+ )
2392
+ self.autoscroll_checkbox.setSizePolicy(sizePolicy1)
2393
+
2394
+ self.horizontalLayout_77.addWidget(self.autoscroll_checkbox)
2395
+
2396
+ self.autoscroll_layout.addLayout(self.horizontalLayout_77)
2397
+
2398
+ self.horizontalSpacer_91 = QSpacerItem(
2399
+ 10, 10, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum
2400
+ )
2401
+
2402
+ self.autoscroll_layout.addItem(self.horizontalSpacer_91)
2403
+
2404
+ self.verticalLayout_7.addLayout(self.autoscroll_layout)
2405
+
2406
+ self.verticalLayout_6.addWidget(self.manual_defaults_groupbox)
2353
2407
 
2354
2408
  self.verticalSpacer_5 = QSpacerItem(
2355
2409
  5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding
@@ -3112,32 +3166,96 @@ class Ui_PrimaryWindow(object):
3112
3166
  None,
3113
3167
  )
3114
3168
  )
3169
+ self.primary_defaults_groupbox.setTitle(
3170
+ QCoreApplication.translate("PrimaryWindow", "Primary window settings", None)
3171
+ )
3115
3172
  self.label_17.setText(
3116
3173
  QCoreApplication.translate("PrimaryWindow", "Epoch length:", None)
3117
3174
  )
3175
+ # if QT_CONFIG(tooltip)
3176
+ self.default_epoch_input.setToolTip(
3177
+ QCoreApplication.translate(
3178
+ "PrimaryWindow",
3179
+ "This sets the temporal resolution for sleep scoring",
3180
+ None,
3181
+ )
3182
+ )
3183
+ # endif // QT_CONFIG(tooltip)
3118
3184
  self.default_epoch_input.setSuffix(
3119
3185
  QCoreApplication.translate("PrimaryWindow", " sec", None)
3120
3186
  )
3187
+ # if QT_CONFIG(tooltip)
3188
+ self.overwrite_default_checkbox.setToolTip(
3189
+ QCoreApplication.translate(
3190
+ "PrimaryWindow",
3191
+ "During automated scoring, only overwrite epochs with the undefined brain state",
3192
+ None,
3193
+ )
3194
+ )
3195
+ # endif // QT_CONFIG(tooltip)
3121
3196
  self.overwrite_default_checkbox.setText(
3122
3197
  QCoreApplication.translate(
3123
3198
  "PrimaryWindow", "Only overwrite undefined epochs", None
3124
3199
  )
3125
3200
  )
3201
+ # if QT_CONFIG(tooltip)
3202
+ self.confidence_setting_checkbox.setToolTip(
3203
+ QCoreApplication.translate(
3204
+ "PrimaryWindow",
3205
+ "Save the model's confidence scores in label files",
3206
+ None,
3207
+ )
3208
+ )
3209
+ # endif // QT_CONFIG(tooltip)
3126
3210
  self.confidence_setting_checkbox.setText(
3127
3211
  QCoreApplication.translate("PrimaryWindow", "Save confidence scores", None)
3128
3212
  )
3129
3213
  self.label_19.setText(
3130
3214
  QCoreApplication.translate("PrimaryWindow", "Minimum bout length:", None)
3131
3215
  )
3216
+ # if QT_CONFIG(tooltip)
3217
+ self.default_min_bout_length_spinbox.setToolTip(
3218
+ QCoreApplication.translate(
3219
+ "PrimaryWindow",
3220
+ "Minimum allowed duration for a bout of any brain state",
3221
+ None,
3222
+ )
3223
+ )
3224
+ # endif // QT_CONFIG(tooltip)
3132
3225
  self.default_min_bout_length_spinbox.setSuffix(
3133
3226
  QCoreApplication.translate("PrimaryWindow", " sec", None)
3134
3227
  )
3228
+ self.manual_defaults_groupbox.setTitle(
3229
+ QCoreApplication.translate(
3230
+ "PrimaryWindow", "Manual scoring window settings", None
3231
+ )
3232
+ )
3233
+ self.label_20.setText(
3234
+ QCoreApplication.translate("PrimaryWindow", "Epochs to show", None)
3235
+ )
3236
+ # if QT_CONFIG(tooltip)
3237
+ self.epochs_to_show_spinbox.setToolTip(
3238
+ QCoreApplication.translate(
3239
+ "PrimaryWindow", "Number of epochs to display in the lower plots", None
3240
+ )
3241
+ )
3242
+ # endif // QT_CONFIG(tooltip)
3243
+ # if QT_CONFIG(tooltip)
3244
+ self.autoscroll_checkbox.setToolTip(
3245
+ QCoreApplication.translate(
3246
+ "PrimaryWindow",
3247
+ "After scoring each epoch, automatically advance to the next one",
3248
+ None,
3249
+ )
3250
+ )
3251
+ # endif // QT_CONFIG(tooltip)
3252
+ self.autoscroll_checkbox.setText(
3253
+ QCoreApplication.translate("PrimaryWindow", "Auto scroll", None)
3254
+ )
3135
3255
  self.ui_default_description_label.setText(
3136
3256
  QCoreApplication.translate(
3137
3257
  "PrimaryWindow",
3138
- "These are the default values/settings that are shown in the primary UI window when it starts up.\n"
3139
- "\n"
3140
- 'Changes here will not affect the **current** state of the controls in the "Sleep scoring" tab.',
3258
+ "<html><head/><body><p>These are the default values/settings that are shown in the primary window and manual scoring window when they start up.</p><p>Changes here will not affect the **current** state of the controls in the &quot;Sleep scoring&quot; tab.</p></body></html>",
3141
3259
  None,
3142
3260
  )
3143
3261
  )