accusleepy 0.4.3__tar.gz → 0.4.4__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 (41) hide show
  1. {accusleepy-0.4.3 → accusleepy-0.4.4}/PKG-INFO +13 -1
  2. {accusleepy-0.4.3 → accusleepy-0.4.4}/README.md +12 -0
  3. accusleepy-0.4.4/accusleepy/gui/images/primary_window.png +0 -0
  4. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/main.py +7 -5
  5. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/manual_scoring.py +2 -6
  6. {accusleepy-0.4.3 → accusleepy-0.4.4}/pyproject.toml +1 -1
  7. accusleepy-0.4.3/accusleepy/gui/images/primary_window.png +0 -0
  8. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/__init__.py +0 -0
  9. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/__main__.py +0 -0
  10. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/brain_state_set.py +0 -0
  11. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/classification.py +0 -0
  12. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/config.json +0 -0
  13. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/constants.py +0 -0
  14. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/fileio.py +0 -0
  15. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/__init__.py +0 -0
  16. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/brightness_down.png +0 -0
  17. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/brightness_up.png +0 -0
  18. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/double_down_arrow.png +0 -0
  19. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/double_up_arrow.png +0 -0
  20. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/down_arrow.png +0 -0
  21. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/home.png +0 -0
  22. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/question.png +0 -0
  23. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/save.png +0 -0
  24. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/up_arrow.png +0 -0
  25. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/zoom_in.png +0 -0
  26. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/icons/zoom_out.png +0 -0
  27. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/images/viewer_window.png +0 -0
  28. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/images/viewer_window_annotated.png +0 -0
  29. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/mplwidget.py +0 -0
  30. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/primary_window.py +0 -0
  31. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/primary_window.ui +0 -0
  32. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/resources.qrc +0 -0
  33. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/resources_rc.py +0 -0
  34. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/text/config_guide.txt +0 -0
  35. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/text/main_guide.md +0 -0
  36. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/text/manual_scoring_guide.md +0 -0
  37. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/viewer_window.py +0 -0
  38. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/gui/viewer_window.ui +0 -0
  39. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/models.py +0 -0
  40. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/multitaper.py +0 -0
  41. {accusleepy-0.4.3 → accusleepy-0.4.4}/accusleepy/signal_processing.py +0 -0
@@ -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
@@ -15,6 +15,18 @@ The data and models associated with AccuSleep are available at https://osf.io/py
15
15
 
16
16
  Please contact zekebarger (at) gmail (dot) com with any questions or comments about the software.
17
17
 
18
+ ## What's new
19
+
20
+ AccuSleePy offers the following improvements over the MATLAB version:
21
+
22
+ - Up to 10 brain states can be configured through the user interface
23
+ - Models can be trained through the user interface
24
+ - Model files contain useful metadata (brain state configuration,
25
+ epoch length, number of epochs)
26
+ - Models optimized for real-time scoring can be trained
27
+ - Lists of recordings can be imported and exported for repeatable batch processing
28
+ - Undo/redo functionality in the manual scoring interface
29
+
18
30
  ## Installation
19
31
 
20
32
  - (recommended) create a new virtual environment (using
@@ -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
  [project]
2
2
  name = "accusleepy"
3
- version = "0.4.3"
3
+ version = "0.4.4"
4
4
  description = "Python implementation of AccuSleep"
5
5
  authors = [
6
6
  {name = "Zeke Barger",email = "zekebarger@gmail.com"}