accusleepy 0.7.2__py3-none-any.whl → 0.8.0__py3-none-any.whl
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.
- accusleepy/config.json +3 -1
- accusleepy/constants.py +5 -0
- accusleepy/fileio.py +20 -2
- accusleepy/gui/images/primary_window.png +0 -0
- accusleepy/gui/main.py +11 -0
- accusleepy/gui/manual_scoring.py +16 -5
- accusleepy/gui/primary_window.py +149 -31
- accusleepy/gui/primary_window.ui +298 -183
- accusleepy/gui/text/dev_guide.md +57 -0
- accusleepy/gui/viewer_window.py +5 -11
- accusleepy/gui/viewer_window.ui +3 -0
- {accusleepy-0.7.2.dist-info → accusleepy-0.8.0.dist-info}/METADATA +9 -5
- {accusleepy-0.7.2.dist-info → accusleepy-0.8.0.dist-info}/RECORD +14 -13
- {accusleepy-0.7.2.dist-info → accusleepy-0.8.0.dist-info}/WHEEL +1 -1
accusleepy/config.json
CHANGED
accusleepy/constants.py
CHANGED
|
@@ -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
|
accusleepy/fileio.py
CHANGED
|
@@ -112,7 +112,15 @@ def save_labels(
|
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
def load_config() -> tuple[
|
|
115
|
-
BrainStateSet,
|
|
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:
|
|
Binary file
|
accusleepy/gui/main.py
CHANGED
|
@@ -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
|
|
accusleepy/gui/manual_scoring.py
CHANGED
|
@@ -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
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
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
|
|
accusleepy/gui/primary_window.py
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
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(
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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(
|
|
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.
|
|
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
|
|
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 "Sleep scoring" tab.</p></body></html>",
|
|
3141
3259
|
None,
|
|
3142
3260
|
)
|
|
3143
3261
|
)
|
accusleepy/gui/primary_window.ui
CHANGED
|
@@ -1065,9 +1065,6 @@ color: rgb(244, 195, 68);</string>
|
|
|
1065
1065
|
<verstretch>0</verstretch>
|
|
1066
1066
|
</sizepolicy>
|
|
1067
1067
|
</property>
|
|
1068
|
-
<property name="styleSheet">
|
|
1069
|
-
<string notr="true">background-color: transparent;</string>
|
|
1070
|
-
</property>
|
|
1071
1068
|
<property name="text">
|
|
1072
1069
|
<string>Only overwrite undefined epochs</string>
|
|
1073
1070
|
</property>
|
|
@@ -1097,9 +1094,6 @@ color: rgb(244, 195, 68);</string>
|
|
|
1097
1094
|
<verstretch>0</verstretch>
|
|
1098
1095
|
</sizepolicy>
|
|
1099
1096
|
</property>
|
|
1100
|
-
<property name="styleSheet">
|
|
1101
|
-
<string notr="true">background-color: transparent;</string>
|
|
1102
|
-
</property>
|
|
1103
1097
|
<property name="text">
|
|
1104
1098
|
<string>Save confidence scores</string>
|
|
1105
1099
|
</property>
|
|
@@ -3793,184 +3787,307 @@ Each brain state has several attributes:
|
|
|
3793
3787
|
<item>
|
|
3794
3788
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
3795
3789
|
<property name="spacing">
|
|
3796
|
-
<number>
|
|
3790
|
+
<number>20</number>
|
|
3797
3791
|
</property>
|
|
3798
3792
|
<item>
|
|
3799
|
-
<
|
|
3800
|
-
<
|
|
3801
|
-
<
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
<
|
|
3811
|
-
<
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
<
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
</
|
|
3863
|
-
</
|
|
3864
|
-
</
|
|
3865
|
-
</
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
</
|
|
3893
|
-
</
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3793
|
+
<widget class="QGroupBox" name="primary_defaults_groupbox">
|
|
3794
|
+
<property name="title">
|
|
3795
|
+
<string>Primary window settings</string>
|
|
3796
|
+
</property>
|
|
3797
|
+
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
3798
|
+
<property name="spacing">
|
|
3799
|
+
<number>10</number>
|
|
3800
|
+
</property>
|
|
3801
|
+
<item>
|
|
3802
|
+
<layout class="QHBoxLayout" name="default_epoch_layout">
|
|
3803
|
+
<item>
|
|
3804
|
+
<layout class="QHBoxLayout" name="horizontalLayout_60">
|
|
3805
|
+
<item>
|
|
3806
|
+
<widget class="QLabel" name="label_17">
|
|
3807
|
+
<property name="sizePolicy">
|
|
3808
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
3809
|
+
<horstretch>0</horstretch>
|
|
3810
|
+
<verstretch>0</verstretch>
|
|
3811
|
+
</sizepolicy>
|
|
3812
|
+
</property>
|
|
3813
|
+
<property name="text">
|
|
3814
|
+
<string>Epoch length:</string>
|
|
3815
|
+
</property>
|
|
3816
|
+
</widget>
|
|
3817
|
+
</item>
|
|
3818
|
+
<item>
|
|
3819
|
+
<widget class="QDoubleSpinBox" name="default_epoch_input">
|
|
3820
|
+
<property name="sizePolicy">
|
|
3821
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
3822
|
+
<horstretch>0</horstretch>
|
|
3823
|
+
<verstretch>0</verstretch>
|
|
3824
|
+
</sizepolicy>
|
|
3825
|
+
</property>
|
|
3826
|
+
<property name="toolTip">
|
|
3827
|
+
<string>This sets the temporal resolution for sleep scoring</string>
|
|
3828
|
+
</property>
|
|
3829
|
+
<property name="suffix">
|
|
3830
|
+
<string> sec</string>
|
|
3831
|
+
</property>
|
|
3832
|
+
<property name="maximum">
|
|
3833
|
+
<double>100000.000000000000000</double>
|
|
3834
|
+
</property>
|
|
3835
|
+
<property name="singleStep">
|
|
3836
|
+
<double>0.500000000000000</double>
|
|
3837
|
+
</property>
|
|
3838
|
+
</widget>
|
|
3839
|
+
</item>
|
|
3840
|
+
</layout>
|
|
3841
|
+
</item>
|
|
3842
|
+
<item>
|
|
3843
|
+
<spacer name="horizontalSpacer_70">
|
|
3844
|
+
<property name="orientation">
|
|
3845
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
3846
|
+
</property>
|
|
3847
|
+
<property name="sizeType">
|
|
3848
|
+
<enum>QSizePolicy::Policy::Expanding</enum>
|
|
3849
|
+
</property>
|
|
3850
|
+
<property name="sizeHint" stdset="0">
|
|
3851
|
+
<size>
|
|
3852
|
+
<width>10</width>
|
|
3853
|
+
<height>10</height>
|
|
3854
|
+
</size>
|
|
3855
|
+
</property>
|
|
3856
|
+
</spacer>
|
|
3857
|
+
</item>
|
|
3858
|
+
</layout>
|
|
3859
|
+
</item>
|
|
3860
|
+
<item>
|
|
3861
|
+
<layout class="QHBoxLayout" name="horizontalLayout_75">
|
|
3862
|
+
<item>
|
|
3863
|
+
<layout class="QHBoxLayout" name="horizontalLayout_76">
|
|
3864
|
+
<item>
|
|
3865
|
+
<widget class="QCheckBox" name="overwrite_default_checkbox">
|
|
3866
|
+
<property name="toolTip">
|
|
3867
|
+
<string>During automated scoring, only overwrite epochs with the undefined brain state</string>
|
|
3868
|
+
</property>
|
|
3869
|
+
<property name="text">
|
|
3870
|
+
<string>Only overwrite undefined epochs</string>
|
|
3871
|
+
</property>
|
|
3872
|
+
</widget>
|
|
3873
|
+
</item>
|
|
3874
|
+
</layout>
|
|
3875
|
+
</item>
|
|
3876
|
+
<item>
|
|
3877
|
+
<spacer name="horizontalSpacer_88">
|
|
3878
|
+
<property name="orientation">
|
|
3879
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
3880
|
+
</property>
|
|
3881
|
+
<property name="sizeHint" stdset="0">
|
|
3882
|
+
<size>
|
|
3883
|
+
<width>40</width>
|
|
3884
|
+
<height>20</height>
|
|
3885
|
+
</size>
|
|
3886
|
+
</property>
|
|
3887
|
+
</spacer>
|
|
3888
|
+
</item>
|
|
3889
|
+
</layout>
|
|
3890
|
+
</item>
|
|
3891
|
+
<item>
|
|
3892
|
+
<layout class="QHBoxLayout" name="confidence_score_setting_layout">
|
|
3893
|
+
<item>
|
|
3894
|
+
<layout class="QHBoxLayout" name="horizontalLayout_62">
|
|
3895
|
+
<item>
|
|
3896
|
+
<widget class="QCheckBox" name="confidence_setting_checkbox">
|
|
3897
|
+
<property name="sizePolicy">
|
|
3898
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
3899
|
+
<horstretch>0</horstretch>
|
|
3900
|
+
<verstretch>0</verstretch>
|
|
3901
|
+
</sizepolicy>
|
|
3902
|
+
</property>
|
|
3903
|
+
<property name="toolTip">
|
|
3904
|
+
<string>Save the model's confidence scores in label files</string>
|
|
3905
|
+
</property>
|
|
3906
|
+
<property name="text">
|
|
3907
|
+
<string>Save confidence scores</string>
|
|
3908
|
+
</property>
|
|
3909
|
+
<property name="checked">
|
|
3910
|
+
<bool>true</bool>
|
|
3911
|
+
</property>
|
|
3912
|
+
</widget>
|
|
3913
|
+
</item>
|
|
3914
|
+
</layout>
|
|
3915
|
+
</item>
|
|
3916
|
+
<item>
|
|
3917
|
+
<spacer name="horizontalSpacer_72">
|
|
3918
|
+
<property name="orientation">
|
|
3919
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
3920
|
+
</property>
|
|
3921
|
+
<property name="sizeType">
|
|
3922
|
+
<enum>QSizePolicy::Policy::Expanding</enum>
|
|
3923
|
+
</property>
|
|
3924
|
+
<property name="sizeHint" stdset="0">
|
|
3925
|
+
<size>
|
|
3926
|
+
<width>10</width>
|
|
3927
|
+
<height>10</height>
|
|
3928
|
+
</size>
|
|
3929
|
+
</property>
|
|
3930
|
+
</spacer>
|
|
3931
|
+
</item>
|
|
3932
|
+
</layout>
|
|
3933
|
+
</item>
|
|
3934
|
+
<item>
|
|
3935
|
+
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
3936
|
+
<item>
|
|
3937
|
+
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
|
3938
|
+
<item>
|
|
3939
|
+
<widget class="QLabel" name="label_19">
|
|
3940
|
+
<property name="sizePolicy">
|
|
3941
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
3942
|
+
<horstretch>0</horstretch>
|
|
3943
|
+
<verstretch>0</verstretch>
|
|
3944
|
+
</sizepolicy>
|
|
3945
|
+
</property>
|
|
3946
|
+
<property name="text">
|
|
3947
|
+
<string>Minimum bout length:</string>
|
|
3948
|
+
</property>
|
|
3949
|
+
</widget>
|
|
3950
|
+
</item>
|
|
3951
|
+
<item>
|
|
3952
|
+
<widget class="QDoubleSpinBox" name="default_min_bout_length_spinbox">
|
|
3953
|
+
<property name="sizePolicy">
|
|
3954
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
3955
|
+
<horstretch>0</horstretch>
|
|
3956
|
+
<verstretch>0</verstretch>
|
|
3957
|
+
</sizepolicy>
|
|
3958
|
+
</property>
|
|
3959
|
+
<property name="toolTip">
|
|
3960
|
+
<string>Minimum allowed duration for a bout of any brain state</string>
|
|
3961
|
+
</property>
|
|
3962
|
+
<property name="suffix">
|
|
3963
|
+
<string> sec</string>
|
|
3964
|
+
</property>
|
|
3965
|
+
<property name="maximum">
|
|
3966
|
+
<double>1000.000000000000000</double>
|
|
3967
|
+
</property>
|
|
3968
|
+
<property name="value">
|
|
3969
|
+
<double>5.000000000000000</double>
|
|
3970
|
+
</property>
|
|
3971
|
+
</widget>
|
|
3972
|
+
</item>
|
|
3973
|
+
</layout>
|
|
3974
|
+
</item>
|
|
3975
|
+
<item>
|
|
3976
|
+
<spacer name="horizontalSpacer_90">
|
|
3977
|
+
<property name="orientation">
|
|
3978
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
3979
|
+
</property>
|
|
3980
|
+
<property name="sizeHint" stdset="0">
|
|
3981
|
+
<size>
|
|
3982
|
+
<width>5</width>
|
|
3983
|
+
<height>5</height>
|
|
3984
|
+
</size>
|
|
3985
|
+
</property>
|
|
3986
|
+
</spacer>
|
|
3987
|
+
</item>
|
|
3988
|
+
</layout>
|
|
3989
|
+
</item>
|
|
3990
|
+
</layout>
|
|
3991
|
+
</widget>
|
|
3921
3992
|
</item>
|
|
3922
3993
|
<item>
|
|
3923
|
-
<
|
|
3924
|
-
<
|
|
3925
|
-
<
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
<
|
|
3935
|
-
<
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
<
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
<
|
|
3967
|
-
<
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3994
|
+
<widget class="QGroupBox" name="manual_defaults_groupbox">
|
|
3995
|
+
<property name="title">
|
|
3996
|
+
<string>Manual scoring window settings</string>
|
|
3997
|
+
</property>
|
|
3998
|
+
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
3999
|
+
<property name="spacing">
|
|
4000
|
+
<number>10</number>
|
|
4001
|
+
</property>
|
|
4002
|
+
<item>
|
|
4003
|
+
<layout class="QHBoxLayout" name="epochs_to_show_layout">
|
|
4004
|
+
<item>
|
|
4005
|
+
<layout class="QHBoxLayout" name="horizontalLayout_78">
|
|
4006
|
+
<item>
|
|
4007
|
+
<widget class="QLabel" name="label_20">
|
|
4008
|
+
<property name="sizePolicy">
|
|
4009
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
4010
|
+
<horstretch>0</horstretch>
|
|
4011
|
+
<verstretch>0</verstretch>
|
|
4012
|
+
</sizepolicy>
|
|
4013
|
+
</property>
|
|
4014
|
+
<property name="text">
|
|
4015
|
+
<string>Epochs to show</string>
|
|
4016
|
+
</property>
|
|
4017
|
+
</widget>
|
|
4018
|
+
</item>
|
|
4019
|
+
<item>
|
|
4020
|
+
<widget class="QSpinBox" name="epochs_to_show_spinbox">
|
|
4021
|
+
<property name="toolTip">
|
|
4022
|
+
<string>Number of epochs to display in the lower plots</string>
|
|
4023
|
+
</property>
|
|
4024
|
+
<property name="minimum">
|
|
4025
|
+
<number>3</number>
|
|
4026
|
+
</property>
|
|
4027
|
+
<property name="singleStep">
|
|
4028
|
+
<number>2</number>
|
|
4029
|
+
</property>
|
|
4030
|
+
<property name="value">
|
|
4031
|
+
<number>5</number>
|
|
4032
|
+
</property>
|
|
4033
|
+
</widget>
|
|
4034
|
+
</item>
|
|
4035
|
+
</layout>
|
|
4036
|
+
</item>
|
|
4037
|
+
<item>
|
|
4038
|
+
<spacer name="horizontalSpacer_92">
|
|
4039
|
+
<property name="orientation">
|
|
4040
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
4041
|
+
</property>
|
|
4042
|
+
<property name="sizeHint" stdset="0">
|
|
4043
|
+
<size>
|
|
4044
|
+
<width>40</width>
|
|
4045
|
+
<height>20</height>
|
|
4046
|
+
</size>
|
|
4047
|
+
</property>
|
|
4048
|
+
</spacer>
|
|
4049
|
+
</item>
|
|
4050
|
+
</layout>
|
|
4051
|
+
</item>
|
|
4052
|
+
<item>
|
|
4053
|
+
<layout class="QHBoxLayout" name="autoscroll_layout">
|
|
4054
|
+
<item>
|
|
4055
|
+
<layout class="QHBoxLayout" name="horizontalLayout_77">
|
|
4056
|
+
<item>
|
|
4057
|
+
<widget class="QCheckBox" name="autoscroll_checkbox">
|
|
4058
|
+
<property name="sizePolicy">
|
|
4059
|
+
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
4060
|
+
<horstretch>0</horstretch>
|
|
4061
|
+
<verstretch>0</verstretch>
|
|
4062
|
+
</sizepolicy>
|
|
4063
|
+
</property>
|
|
4064
|
+
<property name="toolTip">
|
|
4065
|
+
<string>After scoring each epoch, automatically advance to the next one</string>
|
|
4066
|
+
</property>
|
|
4067
|
+
<property name="text">
|
|
4068
|
+
<string>Auto scroll</string>
|
|
4069
|
+
</property>
|
|
4070
|
+
</widget>
|
|
4071
|
+
</item>
|
|
4072
|
+
</layout>
|
|
4073
|
+
</item>
|
|
4074
|
+
<item>
|
|
4075
|
+
<spacer name="horizontalSpacer_91">
|
|
4076
|
+
<property name="orientation">
|
|
4077
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
|
4078
|
+
</property>
|
|
4079
|
+
<property name="sizeHint" stdset="0">
|
|
4080
|
+
<size>
|
|
4081
|
+
<width>10</width>
|
|
4082
|
+
<height>10</height>
|
|
4083
|
+
</size>
|
|
4084
|
+
</property>
|
|
4085
|
+
</spacer>
|
|
4086
|
+
</item>
|
|
4087
|
+
</layout>
|
|
4088
|
+
</item>
|
|
4089
|
+
</layout>
|
|
4090
|
+
</widget>
|
|
3974
4091
|
</item>
|
|
3975
4092
|
<item>
|
|
3976
4093
|
<spacer name="verticalSpacer_5">
|
|
@@ -3995,9 +4112,7 @@ Each brain state has several attributes:
|
|
|
3995
4112
|
<string notr="true">background-color: white;</string>
|
|
3996
4113
|
</property>
|
|
3997
4114
|
<property name="text">
|
|
3998
|
-
<string
|
|
3999
|
-
|
|
4000
|
-
Changes here will not affect the **current** state of the controls in the "Sleep scoring" tab.</string>
|
|
4115
|
+
<string><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></string>
|
|
4001
4116
|
</property>
|
|
4002
4117
|
<property name="textFormat">
|
|
4003
4118
|
<enum>Qt::TextFormat::MarkdownText</enum>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Developer guide
|
|
2
|
+
|
|
3
|
+
## Getting started
|
|
4
|
+
This project uses poetry for dependency management and
|
|
5
|
+
pre-commit hooks to maintain a consistent style.
|
|
6
|
+
To set up your development environment:
|
|
7
|
+
1. Install [poetry](https://python-poetry.org/docs/#installation)
|
|
8
|
+
2. Clone the repo
|
|
9
|
+
3. Set up your virtual environment
|
|
10
|
+
4. Run `poetry install` to install dependencies
|
|
11
|
+
5. Run `pre-commit install` to set up the git hook scripts
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Editing the GUI
|
|
15
|
+
Start by installing
|
|
16
|
+
[Qt Creator](https://doc.qt.io/qtcreator/). This software lets you
|
|
17
|
+
interactively modify the `.ui` files for the primary interface
|
|
18
|
+
and the manual scoring interface.
|
|
19
|
+
|
|
20
|
+
### Exporting your changes
|
|
21
|
+
Once you have made edits to a `.ui` file in Qt Creator and saved
|
|
22
|
+
your changes, you need to update the python representation of the UI.
|
|
23
|
+
1. Update the corresponding `.py` file by running
|
|
24
|
+
```
|
|
25
|
+
pyside6-uic accusleepy/gui/<filename>.ui -o accusleepy/gui/<filename>.py
|
|
26
|
+
```
|
|
27
|
+
where `<filename>` is either `primary_window` or `viewer_window`.
|
|
28
|
+
|
|
29
|
+
> [!NOTE]
|
|
30
|
+
> If for some reason that doesn't work, on Windows you can
|
|
31
|
+
> locate `uic.exe` in your PySide6 installation and run
|
|
32
|
+
> ```
|
|
33
|
+
> <path_to_your_uic>.exe -g python accusleepy\gui\<filename>.ui -o accusleepy\gui\<filename>.py
|
|
34
|
+
> ```
|
|
35
|
+
2. `uic` does not create some necessary imports in the modified
|
|
36
|
+
`.py` file, so you will need to add them back.
|
|
37
|
+
Open the file and add the following import statement:
|
|
38
|
+
```
|
|
39
|
+
import accusleepy.gui.resources_rc # noqa F401
|
|
40
|
+
```
|
|
41
|
+
If the file already contains the line `import resources_rc`,
|
|
42
|
+
replace it with the one above.
|
|
43
|
+
If you updated `viewer_window.py`, you also need to add:
|
|
44
|
+
```
|
|
45
|
+
from accusleepy.gui.mplwidget import MplWidget
|
|
46
|
+
```
|
|
47
|
+
(replacing `from mplwidget import MplWidget` if necessary)
|
|
48
|
+
|
|
49
|
+
### Updating the resources file
|
|
50
|
+
If you want to modify the resources available to the GUI
|
|
51
|
+
(e.g., icon image files), you can edit the `resources.qrc`
|
|
52
|
+
file using Qt Creator. You then need to update the python
|
|
53
|
+
representation by running
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
pyside6-rcc accusleepy/gui/resources.qrc -o accusleepy/gui/resources_rc.py
|
|
57
|
+
```
|
accusleepy/gui/viewer_window.py
CHANGED
|
@@ -3,20 +3,13 @@
|
|
|
3
3
|
################################################################################
|
|
4
4
|
## Form generated from reading UI file 'viewer_window.ui'
|
|
5
5
|
##
|
|
6
|
-
## Created by: Qt User Interface Compiler version 6.
|
|
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
|
-
|
|
13
|
-
QMetaObject,
|
|
14
|
-
QSize,
|
|
15
|
-
Qt,
|
|
16
|
-
)
|
|
17
|
-
from PySide6.QtGui import (
|
|
18
|
-
QIcon,
|
|
19
|
-
)
|
|
11
|
+
from PySide6.QtCore import QCoreApplication, QMetaObject, QSize, Qt
|
|
12
|
+
from PySide6.QtGui import QIcon
|
|
20
13
|
from PySide6.QtWidgets import (
|
|
21
14
|
QCheckBox,
|
|
22
15
|
QFrame,
|
|
@@ -30,8 +23,8 @@ from PySide6.QtWidgets import (
|
|
|
30
23
|
QVBoxLayout,
|
|
31
24
|
)
|
|
32
25
|
|
|
33
|
-
import accusleepy.gui.resources_rc # noqa F401
|
|
34
26
|
from accusleepy.gui.mplwidget import MplWidget
|
|
27
|
+
import accusleepy.gui.resources_rc # noqa F401
|
|
35
28
|
|
|
36
29
|
|
|
37
30
|
class Ui_ViewerWindow(object):
|
|
@@ -405,6 +398,7 @@ class Ui_ViewerWindow(object):
|
|
|
405
398
|
self.autoscroll.setObjectName("autoscroll")
|
|
406
399
|
sizePolicy1.setHeightForWidth(self.autoscroll.sizePolicy().hasHeightForWidth())
|
|
407
400
|
self.autoscroll.setSizePolicy(sizePolicy1)
|
|
401
|
+
self.autoscroll.setStyleSheet("background-color: none;")
|
|
408
402
|
|
|
409
403
|
self.autoscroll_layout.addWidget(self.autoscroll)
|
|
410
404
|
|
accusleepy/gui/viewer_window.ui
CHANGED
|
@@ -769,6 +769,9 @@
|
|
|
769
769
|
<property name="toolTip">
|
|
770
770
|
<string>Step forward when setting brain state</string>
|
|
771
771
|
</property>
|
|
772
|
+
<property name="styleSheet">
|
|
773
|
+
<string notr="true">background-color: none;</string>
|
|
774
|
+
</property>
|
|
772
775
|
<property name="text">
|
|
773
776
|
<string>Auto scroll</string>
|
|
774
777
|
</property>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: accusleepy
|
|
3
|
-
Version: 0.
|
|
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 (
|
|
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.
|
|
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.
|
|
@@ -3,9 +3,9 @@ accusleepy/__main__.py,sha256=dKzl2N2Hg9lD264CWYNxThRyDKzWwyMwHRXmJxOmMis,104
|
|
|
3
3
|
accusleepy/bouts.py,sha256=F_y6DxnpKFfImYb7vCZluZ2eD5I_33gZXmRM8mvebsg,5679
|
|
4
4
|
accusleepy/brain_state_set.py,sha256=fRkrArHLIbEKimub804yt_mUXoyfsjJEfiJnTjeCMkY,3233
|
|
5
5
|
accusleepy/classification.py,sha256=mF35xMrD9QXGldSnl3vkdHbm7CAptPUNjHxUA_agOTA,9778
|
|
6
|
-
accusleepy/config.json,sha256=
|
|
7
|
-
accusleepy/constants.py,sha256=
|
|
8
|
-
accusleepy/fileio.py,sha256=
|
|
6
|
+
accusleepy/config.json,sha256=VmUFsiGD1ymEyjdzqeM5nTp8jWvDI-DIxLy1_92nueo,875
|
|
7
|
+
accusleepy/constants.py,sha256=62mmsr1NKzF-psS-9esuAE65kAcPL6o8v9UXQEvb5yc,2983
|
|
8
|
+
accusleepy/fileio.py,sha256=iWUQtWCSL9hG3eQC8-RXJUrHv149PBxM3IjYKaUcMFk,7981
|
|
9
9
|
accusleepy/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
accusleepy/gui/icons/brightness_down.png,sha256=PLT1fb83RHIhSRuU7MMMx0G7oJAY7o9wUcnqM8veZfM,12432
|
|
11
11
|
accusleepy/gui/icons/brightness_up.png,sha256=64GnUqgPvN5xZ6Um3wOzwqvUmdAWYZT6eFmWpBsHyks,12989
|
|
@@ -18,25 +18,26 @@ accusleepy/gui/icons/save.png,sha256=J3EA8iU1BqLYRSsrq_OdoZlqrv2yfL7oV54DklTy_DI
|
|
|
18
18
|
accusleepy/gui/icons/up_arrow.png,sha256=V9yF9t1WgjPaUu-mF1YGe_DfaRHg2dUpR_sUVVcvVvY,3329
|
|
19
19
|
accusleepy/gui/icons/zoom_in.png,sha256=MFWnKZp7Rvh4bLPq4Cqo4sB_jQYedUUtT8-ZO8tNYyc,13589
|
|
20
20
|
accusleepy/gui/icons/zoom_out.png,sha256=IB8Jecb3i0U4qjWRR46ridjLpvLCSe7PozBaLqQqYSw,13055
|
|
21
|
-
accusleepy/gui/images/primary_window.png,sha256=
|
|
21
|
+
accusleepy/gui/images/primary_window.png,sha256=jI_E2oZZN-Ajb4_5n-jVlNT7OkEPrK50xK2WOJnaiBc,598184
|
|
22
22
|
accusleepy/gui/images/viewer_window.png,sha256=b_B7m9WSLMAOzNjctq76SyekO1WfC6qYZVNnYfhjPe8,977197
|
|
23
23
|
accusleepy/gui/images/viewer_window_annotated.png,sha256=uMNUmsZIdzDlQpyoiS3lJGoWlg_T325Oj5hDZhM3Y14,146817
|
|
24
|
-
accusleepy/gui/main.py,sha256=
|
|
25
|
-
accusleepy/gui/manual_scoring.py,sha256=
|
|
24
|
+
accusleepy/gui/main.py,sha256=GdxQXdg0kxCaJzClvRiN95A6pQjZ-jBoOb2YyInKvyc,58253
|
|
25
|
+
accusleepy/gui/manual_scoring.py,sha256=woi4LxsUkHfNnjPGKdSFWyynuti1rWFrar6IJP7HyKA,40773
|
|
26
26
|
accusleepy/gui/mplwidget.py,sha256=rJSTtWmLjHn8r3c9Kb23Rc4XzXl3i9B-JrjNjjlNnmQ,13492
|
|
27
|
-
accusleepy/gui/primary_window.py,sha256=
|
|
28
|
-
accusleepy/gui/primary_window.ui,sha256=
|
|
27
|
+
accusleepy/gui/primary_window.py,sha256=qqV-GAC3BgOus1lJMOg2U4AGQbhy35zLMyN8Q7ouTd8,141479
|
|
28
|
+
accusleepy/gui/primary_window.ui,sha256=2mD0G6b8bsyyUvMCUosQ0K-nAzMA2iiP3yMpeh9INcQ,208209
|
|
29
29
|
accusleepy/gui/resources.qrc,sha256=wqPendnTLAuKfVI6v2lKHiRqAWM0oaz2ZuF5cucJdS4,803
|
|
30
30
|
accusleepy/gui/resources_rc.py,sha256=Z2e34h30U4snJjnYdZVV9B6yjATKxxfvgTRt5uXtQdo,329727
|
|
31
|
+
accusleepy/gui/text/dev_guide.md,sha256=PgOXfGvN17fCtnsfGvPhrhK4FUWFGP_TsHA6t9skP3U,2060
|
|
31
32
|
accusleepy/gui/text/main_guide.md,sha256=iZDRp5OWyQX9LV7CMeUFIYv2ryKlIcGALRLXjxR8HpI,8288
|
|
32
33
|
accusleepy/gui/text/manual_scoring_guide.md,sha256=ow_RMSjFy05NupEDSCuJtu-V65-BPnIkrZqtssFoZCQ,999
|
|
33
|
-
accusleepy/gui/viewer_window.py,sha256=
|
|
34
|
-
accusleepy/gui/viewer_window.ui,sha256=
|
|
34
|
+
accusleepy/gui/viewer_window.py,sha256=jysFw7C_Tr7mtK1XNWhIpHblBvatwduE3RF2GP4lrro,24479
|
|
35
|
+
accusleepy/gui/viewer_window.ui,sha256=a89iVLk1sJg9N6ZvWAV6YNPStb2Tm4-rs-W7TmIDkb4,31658
|
|
35
36
|
accusleepy/models.py,sha256=kqkcQJoKi7gpnM8gZ7nZbWGvpv7ruNnFLaB7ED1X6Dc,3493
|
|
36
37
|
accusleepy/multitaper.py,sha256=D5-iglwkFBRciL5tKSNcunMtcq0rM3zHwRHUVPgem1U,25679
|
|
37
38
|
accusleepy/signal_processing.py,sha256=47fEAx8Aqqkiqix1ai2YEK9Fhq6UHoQcwAcOi-a8ewo,16834
|
|
38
39
|
accusleepy/temperature_scaling.py,sha256=glvPcvxHpBdFjwjGfZdNku9L_BozycEmdqZhKKUCCNg,5749
|
|
39
40
|
accusleepy/validation.py,sha256=VpLWK-wD5tCU6lTBG3KYgTi3PWGuYh6NitMgMoMH8JM,4434
|
|
40
|
-
accusleepy-0.
|
|
41
|
-
accusleepy-0.
|
|
42
|
-
accusleepy-0.
|
|
41
|
+
accusleepy-0.8.0.dist-info/METADATA,sha256=gnk8O1By632zTCFJG9ifqkQDDSEDTqggGUpG8F-WPgs,4800
|
|
42
|
+
accusleepy-0.8.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
43
|
+
accusleepy-0.8.0.dist-info/RECORD,,
|