accusleepy 0.4.3__py3-none-any.whl → 0.4.4__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.
Binary file
accusleepy/gui/main.py CHANGED
@@ -51,7 +51,7 @@ from accusleepy.signal_processing import (
51
51
  )
52
52
 
53
53
  # max number of messages to display
54
- MESSAGE_BOX_MAX_DEPTH = 50
54
+ MESSAGE_BOX_MAX_DEPTH = 200
55
55
  LABEL_LENGTH_ERROR = "label file length does not match recording length"
56
56
  # relative path to config guide txt file
57
57
  CONFIG_GUIDE_FILE = os.path.normpath(r"text/config_guide.txt")
@@ -294,7 +294,7 @@ class AccuSleepWindow(QtWidgets.QMainWindow):
294
294
  error_message = self.check_single_file_inputs(recording_index)
295
295
  if error_message:
296
296
  self.show_message(
297
- f"ERROR ({self.recordings[recording_index].name}): {error_message}"
297
+ f"ERROR (recording {self.recordings[recording_index].name}): {error_message}"
298
298
  )
299
299
  return
300
300
 
@@ -431,7 +431,7 @@ class AccuSleepWindow(QtWidgets.QMainWindow):
431
431
  f"error on recording {self.recordings[recording_index].name}"
432
432
  )
433
433
  self.show_message(
434
- f"ERROR ({self.recordings[recording_index].name}): {error_message}"
434
+ f"ERROR (recording {self.recordings[recording_index].name}): {error_message}"
435
435
  )
436
436
  return
437
437
  if self.recordings[recording_index].calibration_file == "":
@@ -440,7 +440,7 @@ class AccuSleepWindow(QtWidgets.QMainWindow):
440
440
  )
441
441
  self.show_message(
442
442
  (
443
- f"ERROR ({self.recordings[recording_index].name}): "
443
+ f"ERROR (recording {self.recordings[recording_index].name}): "
444
444
  "no calibration file selected"
445
445
  )
446
446
  )
@@ -752,7 +752,7 @@ class AccuSleepWindow(QtWidgets.QMainWindow):
752
752
  self.recordings[self.recording_index].calibration_file = filename
753
753
  self.ui.calibration_file_label.setText(filename)
754
754
 
755
- def check_single_file_inputs(self, recording_index: int) -> str:
755
+ def check_single_file_inputs(self, recording_index: int) -> str | None:
756
756
  """Check that a recording's inputs appear valid
757
757
 
758
758
  This runs some basic tests for whether it will be possible to
@@ -772,6 +772,8 @@ class AccuSleepWindow(QtWidgets.QMainWindow):
772
772
  return "invalid epoch length or sampling rate"
773
773
  if self.recordings[self.recording_index].recording_file == "":
774
774
  return "no recording selected"
775
+ if not os.path.isfile(self.recordings[self.recording_index].recording_file):
776
+ return "recording file does not exist"
775
777
  if self.recordings[self.recording_index].label_file == "":
776
778
  return "no label file selected"
777
779
 
@@ -446,8 +446,6 @@ class ManualScoringWindow(QtWidgets.QDialog):
446
446
  self.label_img = create_label_img(
447
447
  self.display_labels, self.label_display_options
448
448
  )
449
- # update the plots
450
- self.update_figures()
451
449
 
452
450
  def redo(self) -> None:
453
451
  """Redo the last change to brain state labels that was undone"""
@@ -716,7 +714,6 @@ class ManualScoringWindow(QtWidgets.QDialog):
716
714
  self.ui.upperfigure.canvas.axes[2].set_xlim(
717
715
  (self.upper_left_epoch, self.upper_right_epoch + 1)
718
716
  )
719
- self.ui.upperfigure.canvas.draw()
720
717
 
721
718
  def zoom_x(self, direction: str) -> None:
722
719
  """Change upper figure x-axis zoom level
@@ -754,6 +751,7 @@ class ManualScoringWindow(QtWidgets.QDialog):
754
751
  self.upper_left_epoch = 0
755
752
  self.upper_right_epoch = self.n_epochs - 1
756
753
  self.adjust_upper_figure_x_limits()
754
+ self.ui.upperfigure.canvas.draw()
757
755
 
758
756
  def modify_current_epoch_label(self, digit: int) -> None:
759
757
  """Change the current epoch's brain state label
@@ -974,8 +972,6 @@ class ManualScoringWindow(QtWidgets.QDialog):
974
972
  else:
975
973
  self.upper_left_epoch = self.epoch - upper_epoch_padding
976
974
  self.upper_right_epoch = self.epoch + upper_epoch_padding
977
- # update upper marker
978
- self.update_upper_marker()
979
975
  self.adjust_upper_figure_x_limits()
980
976
 
981
977
  # update lower figure x-axis range
@@ -990,7 +986,7 @@ class ManualScoringWindow(QtWidgets.QDialog):
990
986
  self.lower_left_epoch = self.epoch - lower_epoch_padding
991
987
  self.lower_right_epoch = self.epoch + lower_epoch_padding
992
988
 
993
- self.update_lower_figure()
989
+ self.update_figures()
994
990
 
995
991
 
996
992
  def convert_labels(labels: np.array, style: str) -> np.array:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: accusleepy
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Python implementation of AccuSleep
5
5
  License: GPL-3.0-only
6
6
  Author: Zeke Barger
@@ -43,6 +43,18 @@ The data and models associated with AccuSleep are available at https://osf.io/py
43
43
 
44
44
  Please contact zekebarger (at) gmail (dot) com with any questions or comments about the software.
45
45
 
46
+ ## What's new
47
+
48
+ AccuSleePy offers the following improvements over the MATLAB version:
49
+
50
+ - Up to 10 brain states can be configured through the user interface
51
+ - Models can be trained through the user interface
52
+ - Model files contain useful metadata (brain state configuration,
53
+ epoch length, number of epochs)
54
+ - Models optimized for real-time scoring can be trained
55
+ - Lists of recordings can be imported and exported for repeatable batch processing
56
+ - Undo/redo functionality in the manual scoring interface
57
+
46
58
  ## Installation
47
59
 
48
60
  - (recommended) create a new virtual environment (using
@@ -17,11 +17,11 @@ accusleepy/gui/icons/save.png,sha256=J3EA8iU1BqLYRSsrq_OdoZlqrv2yfL7oV54DklTy_DI
17
17
  accusleepy/gui/icons/up_arrow.png,sha256=V9yF9t1WgjPaUu-mF1YGe_DfaRHg2dUpR_sUVVcvVvY,3329
18
18
  accusleepy/gui/icons/zoom_in.png,sha256=MFWnKZp7Rvh4bLPq4Cqo4sB_jQYedUUtT8-ZO8tNYyc,13589
19
19
  accusleepy/gui/icons/zoom_out.png,sha256=IB8Jecb3i0U4qjWRR46ridjLpvLCSe7PozBaLqQqYSw,13055
20
- accusleepy/gui/images/primary_window.png,sha256=bT-A7ZPndVnJv3cX5DuzDwcZ44alz3GGIy7MxU0rtiA,593548
20
+ accusleepy/gui/images/primary_window.png,sha256=Taf9llcO_cVI76SImgcugTppxu7upLPQFv5YN2OC8NA,597005
21
21
  accusleepy/gui/images/viewer_window.png,sha256=gKwIXkgsl1rTMfmMeMwNyjEAUL5I6FXk9-hpMR92qTI,970630
22
22
  accusleepy/gui/images/viewer_window_annotated.png,sha256=M5NmoWDHRLS334Rp8SsfOPUUXzPltH1p7aB0BrISgQU,261481
23
- accusleepy/gui/main.py,sha256=GTHsUL9UPosDwzy86ohLj0Tok1OkqYBSl0Ba8Saq2Xs,54210
24
- accusleepy/gui/manual_scoring.py,sha256=l1m7MIY2SgNAYJFe7_hrvQUcZ2w7r5U82iX1dab86LI,40623
23
+ accusleepy/gui/main.py,sha256=QLtxVvBz81CjDeBddJZNDCLd207j9WJga1n45nlsxWI,54384
24
+ accusleepy/gui/manual_scoring.py,sha256=Sy4vwMmMLY_SreXUyxd0t-at2F-1pHkvvz1UGIbzVic,40496
25
25
  accusleepy/gui/mplwidget.py,sha256=f9O3u_96whQGUwpi3o_QGc7yjiETX5vE0oj3ePXTJWE,12279
26
26
  accusleepy/gui/primary_window.py,sha256=RXpDvcb7zy8Ea4Da1VhMG1T6GC54KW3vyGjqqQJN45k,104582
27
27
  accusleepy/gui/primary_window.ui,sha256=09k4xFcjgOL9mlhFlg6mXCc_tgj4_FY9CZ3H03e3z3A,147074
@@ -35,6 +35,6 @@ accusleepy/gui/viewer_window.ui,sha256=D1LwUFR-kZ_GWGZFFtXvGJdFWghLrOWZTblQeLQt9
35
35
  accusleepy/models.py,sha256=Muapsw088AUHqRIbW97Rkbv0oiwCtQvO9tEoBCC-MYg,1476
36
36
  accusleepy/multitaper.py,sha256=V6MJDk0OSWhg2MFhrnt9dvYrHiNsk2T7IxAA7paZVyE,25549
37
37
  accusleepy/signal_processing.py,sha256=-aXnywfp1LBsk3DcbIMmZlgv3f8j6sZ6js0bizZId0o,21718
38
- accusleepy-0.4.3.dist-info/METADATA,sha256=ooPrsNpkjVtzsWovyX30OW5qlcQgOW1bs1P7sHA3UDc,3137
39
- accusleepy-0.4.3.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
40
- accusleepy-0.4.3.dist-info/RECORD,,
38
+ accusleepy-0.4.4.dist-info/METADATA,sha256=-ljW9uyRze3PQhDr85hTMrKzOWveDCALUH2cPs2sT_E,3653
39
+ accusleepy-0.4.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
40
+ accusleepy-0.4.4.dist-info/RECORD,,