accusleepy 0.6.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.
Files changed (42) hide show
  1. accusleepy/__init__.py +0 -0
  2. accusleepy/__main__.py +4 -0
  3. accusleepy/bouts.py +142 -0
  4. accusleepy/brain_state_set.py +89 -0
  5. accusleepy/classification.py +285 -0
  6. accusleepy/config.json +24 -0
  7. accusleepy/constants.py +46 -0
  8. accusleepy/fileio.py +179 -0
  9. accusleepy/gui/__init__.py +0 -0
  10. accusleepy/gui/icons/brightness_down.png +0 -0
  11. accusleepy/gui/icons/brightness_up.png +0 -0
  12. accusleepy/gui/icons/double_down_arrow.png +0 -0
  13. accusleepy/gui/icons/double_up_arrow.png +0 -0
  14. accusleepy/gui/icons/down_arrow.png +0 -0
  15. accusleepy/gui/icons/home.png +0 -0
  16. accusleepy/gui/icons/question.png +0 -0
  17. accusleepy/gui/icons/save.png +0 -0
  18. accusleepy/gui/icons/up_arrow.png +0 -0
  19. accusleepy/gui/icons/zoom_in.png +0 -0
  20. accusleepy/gui/icons/zoom_out.png +0 -0
  21. accusleepy/gui/images/primary_window.png +0 -0
  22. accusleepy/gui/images/viewer_window.png +0 -0
  23. accusleepy/gui/images/viewer_window_annotated.png +0 -0
  24. accusleepy/gui/main.py +1494 -0
  25. accusleepy/gui/manual_scoring.py +1096 -0
  26. accusleepy/gui/mplwidget.py +386 -0
  27. accusleepy/gui/primary_window.py +2577 -0
  28. accusleepy/gui/primary_window.ui +3831 -0
  29. accusleepy/gui/resources.qrc +16 -0
  30. accusleepy/gui/resources_rc.py +6710 -0
  31. accusleepy/gui/text/config_guide.txt +27 -0
  32. accusleepy/gui/text/main_guide.md +167 -0
  33. accusleepy/gui/text/manual_scoring_guide.md +23 -0
  34. accusleepy/gui/viewer_window.py +610 -0
  35. accusleepy/gui/viewer_window.ui +926 -0
  36. accusleepy/models.py +108 -0
  37. accusleepy/multitaper.py +661 -0
  38. accusleepy/signal_processing.py +469 -0
  39. accusleepy/temperature_scaling.py +157 -0
  40. accusleepy-0.6.0.dist-info/METADATA +106 -0
  41. accusleepy-0.6.0.dist-info/RECORD +42 -0
  42. accusleepy-0.6.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,610 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ ################################################################################
4
+ ## Form generated from reading UI file 'viewer_window.ui'
5
+ ##
6
+ ## Created by: Qt User Interface Compiler version 6.7.3
7
+ ##
8
+ ## WARNING! All changes made in this file will be lost when recompiling UI file!
9
+ ################################################################################
10
+
11
+ from PySide6.QtCore import (
12
+ QCoreApplication,
13
+ QMetaObject,
14
+ QSize,
15
+ Qt,
16
+ )
17
+ from PySide6.QtGui import (
18
+ QIcon,
19
+ )
20
+ from PySide6.QtWidgets import (
21
+ QCheckBox,
22
+ QFrame,
23
+ QGridLayout,
24
+ QHBoxLayout,
25
+ QLabel,
26
+ QLayout,
27
+ QPushButton,
28
+ QSizePolicy,
29
+ QSpacerItem,
30
+ QVBoxLayout,
31
+ )
32
+
33
+ import accusleepy.gui.resources_rc # noqa F401
34
+ from accusleepy.gui.mplwidget import MplWidget
35
+
36
+
37
+ class Ui_ViewerWindow(object):
38
+ def setupUi(self, ViewerWindow):
39
+ if not ViewerWindow.objectName():
40
+ ViewerWindow.setObjectName("ViewerWindow")
41
+ ViewerWindow.resize(1200, 700)
42
+ sizePolicy = QSizePolicy(
43
+ QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred
44
+ )
45
+ sizePolicy.setHorizontalStretch(0)
46
+ sizePolicy.setVerticalStretch(0)
47
+ sizePolicy.setHeightForWidth(ViewerWindow.sizePolicy().hasHeightForWidth())
48
+ ViewerWindow.setSizePolicy(sizePolicy)
49
+ ViewerWindow.setStyleSheet("background-color: white;")
50
+ self.horizontalLayout = QHBoxLayout(ViewerWindow)
51
+ self.horizontalLayout.setObjectName("horizontalLayout")
52
+ self.all_plots = QVBoxLayout()
53
+ self.all_plots.setSpacing(1)
54
+ self.all_plots.setObjectName("all_plots")
55
+ self.all_plots.setSizeConstraint(QLayout.SizeConstraint.SetMinimumSize)
56
+ self.upperfigure = MplWidget(ViewerWindow)
57
+ self.upperfigure.setObjectName("upperfigure")
58
+ sizePolicy.setHeightForWidth(self.upperfigure.sizePolicy().hasHeightForWidth())
59
+ self.upperfigure.setSizePolicy(sizePolicy)
60
+ self.upperfigure.setAutoFillBackground(False)
61
+
62
+ self.all_plots.addWidget(self.upperfigure)
63
+
64
+ self.line = QFrame(ViewerWindow)
65
+ self.line.setObjectName("line")
66
+ self.line.setLineWidth(2)
67
+ self.line.setFrameShape(QFrame.Shape.HLine)
68
+ self.line.setFrameShadow(QFrame.Shadow.Sunken)
69
+
70
+ self.all_plots.addWidget(self.line)
71
+
72
+ self.lowerfigure = MplWidget(ViewerWindow)
73
+ self.lowerfigure.setObjectName("lowerfigure")
74
+ sizePolicy.setHeightForWidth(self.lowerfigure.sizePolicy().hasHeightForWidth())
75
+ self.lowerfigure.setSizePolicy(sizePolicy)
76
+ self.lowerfigure.setAutoFillBackground(False)
77
+
78
+ self.all_plots.addWidget(self.lowerfigure)
79
+
80
+ self.all_plots.setStretch(0, 50)
81
+ self.all_plots.setStretch(1, 1)
82
+ self.all_plots.setStretch(2, 50)
83
+
84
+ self.horizontalLayout.addLayout(self.all_plots)
85
+
86
+ self.all_controls = QVBoxLayout()
87
+ self.all_controls.setSpacing(20)
88
+ self.all_controls.setObjectName("all_controls")
89
+ self.all_controls.setSizeConstraint(QLayout.SizeConstraint.SetDefaultConstraint)
90
+ self.top_plot_buttons = QVBoxLayout()
91
+ self.top_plot_buttons.setObjectName("top_plot_buttons")
92
+ self.topcontroltopspacer = QSpacerItem(
93
+ 5, 10, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
94
+ )
95
+
96
+ self.top_plot_buttons.addItem(self.topcontroltopspacer)
97
+
98
+ self.save_help_buttons = QHBoxLayout()
99
+ self.save_help_buttons.setSpacing(20)
100
+ self.save_help_buttons.setObjectName("save_help_buttons")
101
+ self.save_help_buttons.setSizeConstraint(
102
+ QLayout.SizeConstraint.SetDefaultConstraint
103
+ )
104
+ self.savebutton = QPushButton(ViewerWindow)
105
+ self.savebutton.setObjectName("savebutton")
106
+ sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
107
+ sizePolicy1.setHorizontalStretch(0)
108
+ sizePolicy1.setVerticalStretch(0)
109
+ sizePolicy1.setHeightForWidth(self.savebutton.sizePolicy().hasHeightForWidth())
110
+ self.savebutton.setSizePolicy(sizePolicy1)
111
+ self.savebutton.setStyleSheet("background-color: rgb(237, 241, 241);")
112
+ icon = QIcon()
113
+ icon.addFile(":/icons/save.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
114
+ self.savebutton.setIcon(icon)
115
+ self.savebutton.setIconSize(QSize(28, 28))
116
+ self.savebutton.setAutoRepeat(True)
117
+
118
+ self.save_help_buttons.addWidget(self.savebutton)
119
+
120
+ self.helpbutton = QPushButton(ViewerWindow)
121
+ self.helpbutton.setObjectName("helpbutton")
122
+ sizePolicy1.setHeightForWidth(self.helpbutton.sizePolicy().hasHeightForWidth())
123
+ self.helpbutton.setSizePolicy(sizePolicy1)
124
+ self.helpbutton.setStyleSheet("background-color: rgb(237, 241, 241);")
125
+ icon1 = QIcon()
126
+ icon1.addFile(
127
+ ":/icons/question.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
128
+ )
129
+ self.helpbutton.setIcon(icon1)
130
+ self.helpbutton.setIconSize(QSize(28, 28))
131
+ self.helpbutton.setAutoRepeat(True)
132
+
133
+ self.save_help_buttons.addWidget(self.helpbutton)
134
+
135
+ self.top_plot_buttons.addLayout(self.save_help_buttons)
136
+
137
+ self.topcontrolmidspacer = QSpacerItem(
138
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
139
+ )
140
+
141
+ self.top_plot_buttons.addItem(self.topcontrolmidspacer)
142
+
143
+ self.zoom_and_brightness = QVBoxLayout()
144
+ self.zoom_and_brightness.setObjectName("zoom_and_brightness")
145
+ self.verticalSpacer_6 = QSpacerItem(
146
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
147
+ )
148
+
149
+ self.zoom_and_brightness.addItem(self.verticalSpacer_6)
150
+
151
+ self.brightness_buttons = QHBoxLayout()
152
+ self.brightness_buttons.setObjectName("brightness_buttons")
153
+ self.specbrighter = QPushButton(ViewerWindow)
154
+ self.specbrighter.setObjectName("specbrighter")
155
+ sizePolicy1.setHeightForWidth(
156
+ self.specbrighter.sizePolicy().hasHeightForWidth()
157
+ )
158
+ self.specbrighter.setSizePolicy(sizePolicy1)
159
+ self.specbrighter.setStyleSheet("background-color: rgb(237, 241, 241);")
160
+ icon2 = QIcon()
161
+ icon2.addFile(
162
+ ":/icons/brightness_up.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
163
+ )
164
+ self.specbrighter.setIcon(icon2)
165
+ self.specbrighter.setIconSize(QSize(24, 24))
166
+ self.specbrighter.setAutoRepeat(True)
167
+
168
+ self.brightness_buttons.addWidget(self.specbrighter)
169
+
170
+ self.specdimmer = QPushButton(ViewerWindow)
171
+ self.specdimmer.setObjectName("specdimmer")
172
+ sizePolicy1.setHeightForWidth(self.specdimmer.sizePolicy().hasHeightForWidth())
173
+ self.specdimmer.setSizePolicy(sizePolicy1)
174
+ self.specdimmer.setStyleSheet("background-color: rgb(237, 241, 241);")
175
+ icon3 = QIcon()
176
+ icon3.addFile(
177
+ ":/icons/brightness_down.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
178
+ )
179
+ self.specdimmer.setIcon(icon3)
180
+ self.specdimmer.setIconSize(QSize(24, 24))
181
+ self.specdimmer.setAutoRepeat(True)
182
+
183
+ self.brightness_buttons.addWidget(self.specdimmer)
184
+
185
+ self.zoom_and_brightness.addLayout(self.brightness_buttons)
186
+
187
+ self.zoom_buttons = QHBoxLayout()
188
+ self.zoom_buttons.setObjectName("zoom_buttons")
189
+ self.zoom_buttons.setSizeConstraint(QLayout.SizeConstraint.SetDefaultConstraint)
190
+ self.zoom_buttons.setContentsMargins(2, -1, 2, -1)
191
+ self.xzoomin = QPushButton(ViewerWindow)
192
+ self.xzoomin.setObjectName("xzoomin")
193
+ sizePolicy1.setHeightForWidth(self.xzoomin.sizePolicy().hasHeightForWidth())
194
+ self.xzoomin.setSizePolicy(sizePolicy1)
195
+ self.xzoomin.setStyleSheet("background-color: rgb(237, 241, 241);")
196
+ icon4 = QIcon()
197
+ icon4.addFile(
198
+ ":/icons/zoom_in.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
199
+ )
200
+ self.xzoomin.setIcon(icon4)
201
+ self.xzoomin.setIconSize(QSize(20, 20))
202
+ self.xzoomin.setAutoRepeat(True)
203
+
204
+ self.zoom_buttons.addWidget(self.xzoomin)
205
+
206
+ self.xzoomout = QPushButton(ViewerWindow)
207
+ self.xzoomout.setObjectName("xzoomout")
208
+ sizePolicy1.setHeightForWidth(self.xzoomout.sizePolicy().hasHeightForWidth())
209
+ self.xzoomout.setSizePolicy(sizePolicy1)
210
+ self.xzoomout.setStyleSheet("background-color: rgb(237, 241, 241);")
211
+ icon5 = QIcon()
212
+ icon5.addFile(
213
+ ":/icons/zoom_out.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
214
+ )
215
+ self.xzoomout.setIcon(icon5)
216
+ self.xzoomout.setIconSize(QSize(20, 20))
217
+ self.xzoomout.setAutoRepeat(True)
218
+
219
+ self.zoom_buttons.addWidget(self.xzoomout)
220
+
221
+ self.xzoomreset = QPushButton(ViewerWindow)
222
+ self.xzoomreset.setObjectName("xzoomreset")
223
+ sizePolicy1.setHeightForWidth(self.xzoomreset.sizePolicy().hasHeightForWidth())
224
+ self.xzoomreset.setSizePolicy(sizePolicy1)
225
+ self.xzoomreset.setStyleSheet("background-color: rgb(237, 241, 241);")
226
+ icon6 = QIcon()
227
+ icon6.addFile(":/icons/home.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off)
228
+ self.xzoomreset.setIcon(icon6)
229
+ self.xzoomreset.setIconSize(QSize(20, 20))
230
+ self.xzoomreset.setAutoRepeat(True)
231
+
232
+ self.zoom_buttons.addWidget(self.xzoomreset)
233
+
234
+ self.zoom_and_brightness.addLayout(self.zoom_buttons)
235
+
236
+ self.verticalSpacer_7 = QSpacerItem(
237
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
238
+ )
239
+
240
+ self.zoom_and_brightness.addItem(self.verticalSpacer_7)
241
+
242
+ self.top_plot_buttons.addLayout(self.zoom_and_brightness)
243
+
244
+ self.topcontrolbottomspacer = QSpacerItem(
245
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
246
+ )
247
+
248
+ self.top_plot_buttons.addItem(self.topcontrolbottomspacer)
249
+
250
+ self.top_plot_buttons.setStretch(0, 2)
251
+ self.top_plot_buttons.setStretch(1, 5)
252
+ self.top_plot_buttons.setStretch(2, 5)
253
+ self.top_plot_buttons.setStretch(3, 12)
254
+ self.top_plot_buttons.setStretch(4, 12)
255
+
256
+ self.all_controls.addLayout(self.top_plot_buttons)
257
+
258
+ self.allcontrolmidspacer = QSpacerItem(
259
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
260
+ )
261
+
262
+ self.all_controls.addItem(self.allcontrolmidspacer)
263
+
264
+ self.bottom_plot_buttons = QVBoxLayout()
265
+ self.bottom_plot_buttons.setObjectName("bottom_plot_buttons")
266
+ self.verticalSpacer_3 = QSpacerItem(
267
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
268
+ )
269
+
270
+ self.bottom_plot_buttons.addItem(self.verticalSpacer_3)
271
+
272
+ self.eeg_emg_buttons = QVBoxLayout()
273
+ self.eeg_emg_buttons.setSpacing(20)
274
+ self.eeg_emg_buttons.setObjectName("eeg_emg_buttons")
275
+ self.eegbuttons = QGridLayout()
276
+ self.eegbuttons.setObjectName("eegbuttons")
277
+ self.eegbuttons.setHorizontalSpacing(10)
278
+ self.eegbuttons.setVerticalSpacing(20)
279
+ self.eegshiftup = QPushButton(ViewerWindow)
280
+ self.eegshiftup.setObjectName("eegshiftup")
281
+ sizePolicy1.setHeightForWidth(self.eegshiftup.sizePolicy().hasHeightForWidth())
282
+ self.eegshiftup.setSizePolicy(sizePolicy1)
283
+ self.eegshiftup.setStyleSheet("background-color: rgb(237, 241, 241);")
284
+ icon7 = QIcon()
285
+ icon7.addFile(
286
+ ":/icons/double_up_arrow.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
287
+ )
288
+ self.eegshiftup.setIcon(icon7)
289
+ self.eegshiftup.setIconSize(QSize(20, 20))
290
+ self.eegshiftup.setAutoRepeat(True)
291
+
292
+ self.eegbuttons.addWidget(self.eegshiftup, 0, 1, 1, 1)
293
+
294
+ self.eegzoomout = QPushButton(ViewerWindow)
295
+ self.eegzoomout.setObjectName("eegzoomout")
296
+ sizePolicy1.setHeightForWidth(self.eegzoomout.sizePolicy().hasHeightForWidth())
297
+ self.eegzoomout.setSizePolicy(sizePolicy1)
298
+ self.eegzoomout.setStyleSheet("background-color: rgb(237, 241, 241);")
299
+ self.eegzoomout.setIcon(icon5)
300
+ self.eegzoomout.setIconSize(QSize(20, 20))
301
+ self.eegzoomout.setAutoRepeat(True)
302
+
303
+ self.eegbuttons.addWidget(self.eegzoomout, 1, 0, 1, 1)
304
+
305
+ self.eegshiftdown = QPushButton(ViewerWindow)
306
+ self.eegshiftdown.setObjectName("eegshiftdown")
307
+ sizePolicy1.setHeightForWidth(
308
+ self.eegshiftdown.sizePolicy().hasHeightForWidth()
309
+ )
310
+ self.eegshiftdown.setSizePolicy(sizePolicy1)
311
+ self.eegshiftdown.setStyleSheet("background-color: rgb(237, 241, 241);")
312
+ icon8 = QIcon()
313
+ icon8.addFile(
314
+ ":/icons/double_down_arrow.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
315
+ )
316
+ self.eegshiftdown.setIcon(icon8)
317
+ self.eegshiftdown.setIconSize(QSize(20, 20))
318
+ self.eegshiftdown.setAutoRepeat(True)
319
+
320
+ self.eegbuttons.addWidget(self.eegshiftdown, 1, 1, 1, 1)
321
+
322
+ self.eegzoomin = QPushButton(ViewerWindow)
323
+ self.eegzoomin.setObjectName("eegzoomin")
324
+ sizePolicy1.setHeightForWidth(self.eegzoomin.sizePolicy().hasHeightForWidth())
325
+ self.eegzoomin.setSizePolicy(sizePolicy1)
326
+ self.eegzoomin.setStyleSheet("background-color: rgb(237, 241, 241);")
327
+ self.eegzoomin.setIcon(icon4)
328
+ self.eegzoomin.setIconSize(QSize(20, 20))
329
+ self.eegzoomin.setAutoRepeat(True)
330
+
331
+ self.eegbuttons.addWidget(self.eegzoomin, 0, 0, 1, 1)
332
+
333
+ self.eeg_emg_buttons.addLayout(self.eegbuttons)
334
+
335
+ self.verticalSpacer_5 = QSpacerItem(
336
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
337
+ )
338
+
339
+ self.eeg_emg_buttons.addItem(self.verticalSpacer_5)
340
+
341
+ self.emgbuttons = QGridLayout()
342
+ self.emgbuttons.setObjectName("emgbuttons")
343
+ self.emgbuttons.setHorizontalSpacing(10)
344
+ self.emgbuttons.setVerticalSpacing(20)
345
+ self.emgzoomin = QPushButton(ViewerWindow)
346
+ self.emgzoomin.setObjectName("emgzoomin")
347
+ sizePolicy1.setHeightForWidth(self.emgzoomin.sizePolicy().hasHeightForWidth())
348
+ self.emgzoomin.setSizePolicy(sizePolicy1)
349
+ self.emgzoomin.setStyleSheet("background-color: rgb(237, 241, 241);")
350
+ self.emgzoomin.setIcon(icon4)
351
+ self.emgzoomin.setIconSize(QSize(20, 20))
352
+ self.emgzoomin.setAutoRepeat(True)
353
+
354
+ self.emgbuttons.addWidget(self.emgzoomin, 0, 0, 1, 1)
355
+
356
+ self.emgshiftdown = QPushButton(ViewerWindow)
357
+ self.emgshiftdown.setObjectName("emgshiftdown")
358
+ sizePolicy1.setHeightForWidth(
359
+ self.emgshiftdown.sizePolicy().hasHeightForWidth()
360
+ )
361
+ self.emgshiftdown.setSizePolicy(sizePolicy1)
362
+ self.emgshiftdown.setStyleSheet("background-color: rgb(237, 241, 241);")
363
+ self.emgshiftdown.setIcon(icon8)
364
+ self.emgshiftdown.setIconSize(QSize(20, 20))
365
+ self.emgshiftdown.setAutoRepeat(True)
366
+
367
+ self.emgbuttons.addWidget(self.emgshiftdown, 1, 1, 1, 1)
368
+
369
+ self.emgshiftup = QPushButton(ViewerWindow)
370
+ self.emgshiftup.setObjectName("emgshiftup")
371
+ sizePolicy1.setHeightForWidth(self.emgshiftup.sizePolicy().hasHeightForWidth())
372
+ self.emgshiftup.setSizePolicy(sizePolicy1)
373
+ self.emgshiftup.setStyleSheet("background-color: rgb(237, 241, 241);")
374
+ self.emgshiftup.setIcon(icon7)
375
+ self.emgshiftup.setIconSize(QSize(20, 20))
376
+ self.emgshiftup.setAutoRepeat(True)
377
+
378
+ self.emgbuttons.addWidget(self.emgshiftup, 0, 1, 1, 1)
379
+
380
+ self.emgzoomout = QPushButton(ViewerWindow)
381
+ self.emgzoomout.setObjectName("emgzoomout")
382
+ sizePolicy1.setHeightForWidth(self.emgzoomout.sizePolicy().hasHeightForWidth())
383
+ self.emgzoomout.setSizePolicy(sizePolicy1)
384
+ self.emgzoomout.setStyleSheet("background-color: rgb(237, 241, 241);")
385
+ self.emgzoomout.setIcon(icon5)
386
+ self.emgzoomout.setIconSize(QSize(20, 20))
387
+ self.emgzoomout.setAutoRepeat(True)
388
+
389
+ self.emgbuttons.addWidget(self.emgzoomout, 1, 0, 1, 1)
390
+
391
+ self.eeg_emg_buttons.addLayout(self.emgbuttons)
392
+
393
+ self.bottom_plot_buttons.addLayout(self.eeg_emg_buttons)
394
+
395
+ self.verticalSpacer = QSpacerItem(
396
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
397
+ )
398
+
399
+ self.bottom_plot_buttons.addItem(self.verticalSpacer)
400
+
401
+ self.autoscroll_layout = QVBoxLayout()
402
+ self.autoscroll_layout.setObjectName("autoscroll_layout")
403
+ self.autoscroll_layout.setContentsMargins(30, -1, 20, -1)
404
+ self.autoscroll = QCheckBox(ViewerWindow)
405
+ self.autoscroll.setObjectName("autoscroll")
406
+ sizePolicy1.setHeightForWidth(self.autoscroll.sizePolicy().hasHeightForWidth())
407
+ self.autoscroll.setSizePolicy(sizePolicy1)
408
+
409
+ self.autoscroll_layout.addWidget(self.autoscroll)
410
+
411
+ self.bottom_plot_buttons.addLayout(self.autoscroll_layout)
412
+
413
+ self.verticalSpacer_2 = QSpacerItem(
414
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Preferred
415
+ )
416
+
417
+ self.bottom_plot_buttons.addItem(self.verticalSpacer_2)
418
+
419
+ self.epoch_controls = QGridLayout()
420
+ self.epoch_controls.setObjectName("epoch_controls")
421
+ self.epoch_controls.setHorizontalSpacing(2)
422
+ self.epoch_controls.setVerticalSpacing(10)
423
+ self.shownepochslabel = QLabel(ViewerWindow)
424
+ self.shownepochslabel.setObjectName("shownepochslabel")
425
+ sizePolicy2 = QSizePolicy(
426
+ QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred
427
+ )
428
+ sizePolicy2.setHorizontalStretch(0)
429
+ sizePolicy2.setVerticalStretch(0)
430
+ sizePolicy2.setHeightForWidth(
431
+ self.shownepochslabel.sizePolicy().hasHeightForWidth()
432
+ )
433
+ self.shownepochslabel.setSizePolicy(sizePolicy2)
434
+ self.shownepochslabel.setAlignment(
435
+ Qt.AlignmentFlag.AlignLeading
436
+ | Qt.AlignmentFlag.AlignLeft
437
+ | Qt.AlignmentFlag.AlignVCenter
438
+ )
439
+
440
+ self.epoch_controls.addWidget(self.shownepochslabel, 0, 1, 1, 1)
441
+
442
+ self.epochsword = QLabel(ViewerWindow)
443
+ self.epochsword.setObjectName("epochsword")
444
+ sizePolicy1.setHeightForWidth(self.epochsword.sizePolicy().hasHeightForWidth())
445
+ self.epochsword.setSizePolicy(sizePolicy1)
446
+
447
+ self.epoch_controls.addWidget(self.epochsword, 0, 0, 1, 1)
448
+
449
+ self.shownepochsplus = QPushButton(ViewerWindow)
450
+ self.shownepochsplus.setObjectName("shownepochsplus")
451
+ sizePolicy1.setHeightForWidth(
452
+ self.shownepochsplus.sizePolicy().hasHeightForWidth()
453
+ )
454
+ self.shownepochsplus.setSizePolicy(sizePolicy1)
455
+ self.shownepochsplus.setStyleSheet("background-color: rgb(237, 241, 241);")
456
+ icon9 = QIcon()
457
+ icon9.addFile(
458
+ ":/icons/up_arrow.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
459
+ )
460
+ self.shownepochsplus.setIcon(icon9)
461
+ self.shownepochsplus.setIconSize(QSize(20, 20))
462
+ self.shownepochsplus.setAutoRepeat(False)
463
+
464
+ self.epoch_controls.addWidget(self.shownepochsplus, 1, 1, 1, 1)
465
+
466
+ self.shownepochsminus = QPushButton(ViewerWindow)
467
+ self.shownepochsminus.setObjectName("shownepochsminus")
468
+ sizePolicy1.setHeightForWidth(
469
+ self.shownepochsminus.sizePolicy().hasHeightForWidth()
470
+ )
471
+ self.shownepochsminus.setSizePolicy(sizePolicy1)
472
+ self.shownepochsminus.setStyleSheet("background-color: rgb(237, 241, 241);")
473
+ icon10 = QIcon()
474
+ icon10.addFile(
475
+ ":/icons/down_arrow.png", QSize(), QIcon.Mode.Normal, QIcon.State.Off
476
+ )
477
+ self.shownepochsminus.setIcon(icon10)
478
+ self.shownepochsminus.setIconSize(QSize(20, 20))
479
+ self.shownepochsminus.setAutoRepeat(False)
480
+
481
+ self.epoch_controls.addWidget(self.shownepochsminus, 1, 0, 1, 1)
482
+
483
+ self.epoch_controls.setColumnStretch(0, 1)
484
+ self.epoch_controls.setColumnStretch(1, 1)
485
+
486
+ self.bottom_plot_buttons.addLayout(self.epoch_controls)
487
+
488
+ self.verticalSpacer_4 = QSpacerItem(
489
+ 5, 5, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed
490
+ )
491
+
492
+ self.bottom_plot_buttons.addItem(self.verticalSpacer_4)
493
+
494
+ self.bottom_plot_buttons.setStretch(0, 1)
495
+ self.bottom_plot_buttons.setStretch(1, 6)
496
+ self.bottom_plot_buttons.setStretch(2, 1)
497
+ self.bottom_plot_buttons.setStretch(3, 3)
498
+ self.bottom_plot_buttons.setStretch(4, 1)
499
+ self.bottom_plot_buttons.setStretch(5, 4)
500
+ self.bottom_plot_buttons.setStretch(6, 1)
501
+
502
+ self.all_controls.addLayout(self.bottom_plot_buttons)
503
+
504
+ self.all_controls.setStretch(0, 50)
505
+ self.all_controls.setStretch(1, 1)
506
+ self.all_controls.setStretch(2, 50)
507
+
508
+ self.horizontalLayout.addLayout(self.all_controls)
509
+
510
+ self.horizontalLayout.setStretch(0, 20)
511
+ self.horizontalLayout.setStretch(1, 1)
512
+
513
+ self.retranslateUi(ViewerWindow)
514
+
515
+ QMetaObject.connectSlotsByName(ViewerWindow)
516
+
517
+ # setupUi
518
+
519
+ def retranslateUi(self, ViewerWindow):
520
+ # if QT_CONFIG(tooltip)
521
+ self.savebutton.setToolTip(
522
+ QCoreApplication.translate("ViewerWindow", "Save labels (Ctrl+S)", None)
523
+ )
524
+ # endif // QT_CONFIG(tooltip)
525
+ self.savebutton.setText("")
526
+ # if QT_CONFIG(tooltip)
527
+ self.helpbutton.setToolTip(
528
+ QCoreApplication.translate("ViewerWindow", "User manual", None)
529
+ )
530
+ # endif // QT_CONFIG(tooltip)
531
+ self.helpbutton.setText("")
532
+ # if QT_CONFIG(tooltip)
533
+ self.specbrighter.setToolTip(
534
+ QCoreApplication.translate("ViewerWindow", "Increase brightness", None)
535
+ )
536
+ # endif // QT_CONFIG(tooltip)
537
+ self.specbrighter.setText("")
538
+ # if QT_CONFIG(tooltip)
539
+ self.specdimmer.setToolTip(
540
+ QCoreApplication.translate("ViewerWindow", "Decrease brightness", None)
541
+ )
542
+ # endif // QT_CONFIG(tooltip)
543
+ self.specdimmer.setText("")
544
+ # if QT_CONFIG(tooltip)
545
+ self.xzoomin.setToolTip(
546
+ QCoreApplication.translate("ViewerWindow", "Zoom in (+)", None)
547
+ )
548
+ # endif // QT_CONFIG(tooltip)
549
+ self.xzoomin.setText("")
550
+ # if QT_CONFIG(tooltip)
551
+ self.xzoomout.setToolTip(
552
+ QCoreApplication.translate("ViewerWindow", "Zoom out (-)", None)
553
+ )
554
+ # endif // QT_CONFIG(tooltip)
555
+ self.xzoomout.setText("")
556
+ # if QT_CONFIG(tooltip)
557
+ self.xzoomreset.setToolTip(
558
+ QCoreApplication.translate("ViewerWindow", "Reset zoom", None)
559
+ )
560
+ # endif // QT_CONFIG(tooltip)
561
+ self.xzoomreset.setText("")
562
+ # if QT_CONFIG(tooltip)
563
+ self.eegshiftup.setToolTip(
564
+ QCoreApplication.translate("ViewerWindow", "Shift signal up", None)
565
+ )
566
+ # endif // QT_CONFIG(tooltip)
567
+ self.eegshiftup.setText("")
568
+ # if QT_CONFIG(tooltip)
569
+ self.eegzoomout.setToolTip(
570
+ QCoreApplication.translate("ViewerWindow", "Scale signal down", None)
571
+ )
572
+ # endif // QT_CONFIG(tooltip)
573
+ self.eegzoomout.setText("")
574
+ # if QT_CONFIG(tooltip)
575
+ self.eegshiftdown.setToolTip(
576
+ QCoreApplication.translate("ViewerWindow", "Shift signal down", None)
577
+ )
578
+ # endif // QT_CONFIG(tooltip)
579
+ self.eegshiftdown.setText("")
580
+ # if QT_CONFIG(tooltip)
581
+ self.eegzoomin.setToolTip(
582
+ QCoreApplication.translate("ViewerWindow", "Scale signal up", None)
583
+ )
584
+ # endif // QT_CONFIG(tooltip)
585
+ self.eegzoomin.setText("")
586
+ self.emgzoomin.setText("")
587
+ self.emgshiftdown.setText("")
588
+ self.emgshiftup.setText("")
589
+ self.emgzoomout.setText("")
590
+ # if QT_CONFIG(tooltip)
591
+ self.autoscroll.setToolTip(
592
+ QCoreApplication.translate(
593
+ "ViewerWindow", "Step forward when setting brain state", None
594
+ )
595
+ )
596
+ # endif // QT_CONFIG(tooltip)
597
+ self.autoscroll.setText(
598
+ QCoreApplication.translate("ViewerWindow", "Auto scroll", None)
599
+ )
600
+ self.shownepochslabel.setText(
601
+ QCoreApplication.translate("ViewerWindow", "5", None)
602
+ )
603
+ self.epochsword.setText(
604
+ QCoreApplication.translate("ViewerWindow", "Epochs:", None)
605
+ )
606
+ self.shownepochsplus.setText("")
607
+ self.shownepochsminus.setText("")
608
+ pass
609
+
610
+ # retranslateUi