misleep 0.2.9__tar.gz → 0.2.11__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.
- {misleep-0.2.9 → misleep-0.2.11}/PKG-INFO +1 -1
- {misleep-0.2.9 → misleep-0.2.11}/misleep/config.ini +4 -5
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/dialog.py +2 -2
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/main_window.py +4 -4
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/utils.py +10 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep.egg-info/PKG-INFO +1 -1
- {misleep-0.2.9 → misleep-0.2.11}/setup.py +1 -1
- misleep-0.2.9/test/__pycache__/test_annotation_io.cpython-38-pytest-8.3.5.pyc +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/LICENSE +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/README.md +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/__main__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/P30_EEG_F_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/P30_EEG_P_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/ado_EEG_F_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/ado_EEG_P_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/adult_EEG_F_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/auto_stage_model/adult_EEG_P_lightgbm.pkl +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/analysis/detection.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/about.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/resources/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/resources/entire_logo.png +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/resources/logo.png +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/resources/misleep.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/resources/misleep.qrc +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/show.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/spec_window.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/thread.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/SWA_detect_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/about_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/auto_stage_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/horizontal_line_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/label_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/main_window_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/save_data_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/spec_window_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/spindle_detect_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/state_spectral_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/gui/uis/transfer_result_dialog_ui.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/io/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/io/annotation_io.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/io/base.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/io/signal_io.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/preprocessing/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/preprocessing/channel.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/preprocessing/signals.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/preprocessing/spectral.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/utils/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/utils/annotation.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/utils/logger_handler.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/utils/self_antropy.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/utils/signals.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/viz/__init__.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/viz/hypnogram.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/viz/signals.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep/viz/spectral.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep.egg-info/SOURCES.txt +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep.egg-info/dependency_links.txt +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep.egg-info/requires.txt +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/misleep.egg-info/top_level.txt +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/setup.cfg +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_annotation_io.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_loadmat73.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_midata.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_show.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_signal_io.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_signals_viz.py +0 -0
- {misleep-0.2.9 → misleep-0.2.11}/test/test_spectral_viz.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[gui]
|
|
2
|
-
version = v0.2.
|
|
3
|
-
updatetime = 2025/
|
|
4
|
-
marker = ['half_signal', 'first REM', 'WindEEG', 'W-R
|
|
2
|
+
version = v0.2.11
|
|
3
|
+
updatetime = 2025/7/14
|
|
4
|
+
marker = ['half_signal', 'first REM', 'WindEEG', 'W-R', 'maker']
|
|
5
5
|
startend = ['burst-supression', 'REM', 'Wake', 'Spindle', 'SWA', 'start end label', 'start end label']
|
|
6
6
|
statemap = {"1": "NREM", "2": "REM", "3": "Wake", "4": "INIT", "5": "IS", "6": "MicroArousal"}
|
|
7
7
|
statecolor = {"1": "orange", "2": "skyblue", "3": "red", "4": "white", "5": "green", "6": "pink"}
|
|
@@ -9,5 +9,4 @@ startendcolor = {"NREM": "orange", "REM": "skyblue", "Wake": "red"}
|
|
|
9
9
|
statecolorbgalpha = 0.1
|
|
10
10
|
markerlinecolor = "red"
|
|
11
11
|
startendlinecolor = "blue"
|
|
12
|
-
openpath = D:
|
|
13
|
-
|
|
12
|
+
openpath = D:
|
|
@@ -27,7 +27,7 @@ from misleep.utils.signals import signal_filter
|
|
|
27
27
|
from misleep.utils.annotation import lst2group
|
|
28
28
|
from misleep.analysis.detection import SWA_detection, spindle_detection
|
|
29
29
|
from misleep.analysis.auto_stage import auto_stage_gbm
|
|
30
|
-
from misleep.gui.utils import cal_draw_spectrum
|
|
30
|
+
from misleep.gui.utils import cal_draw_spectrum, get_base_path
|
|
31
31
|
from misleep.preprocessing.signals import reject_artifact
|
|
32
32
|
import pandas as pd
|
|
33
33
|
from copy import deepcopy
|
|
@@ -221,7 +221,7 @@ class transferResult_dialog(QDialog, Ui_TransferResultDialog):
|
|
|
221
221
|
df, analyse_df, start_end_df, marker_df = transfer_result(mianno=mianno, ac_time=ac_time)
|
|
222
222
|
|
|
223
223
|
fd, _ = QFileDialog.getSaveFileName(self, "Save transfered result",
|
|
224
|
-
f"{config['gui']['openpath']}",
|
|
224
|
+
f"{get_base_path(config['gui']['openpath'])}",
|
|
225
225
|
"*.xlsx;;")
|
|
226
226
|
if fd == '':
|
|
227
227
|
return
|
|
@@ -388,19 +388,19 @@ class main_window(QMainWindow, Ui_MiSleep):
|
|
|
388
388
|
|
|
389
389
|
def load_anno(self):
|
|
390
390
|
"""Triggered by actionLoad_Annotation"""
|
|
391
|
-
anno_path, _ = QFileDialog.
|
|
391
|
+
anno_path, _ = QFileDialog.getOpenFileName(
|
|
392
392
|
self, "Select annotation file",
|
|
393
393
|
f"{self.config['gui']['openpath']}",
|
|
394
394
|
"txt Files (*.txt *.TXT)"
|
|
395
395
|
)
|
|
396
396
|
|
|
397
|
+
if anno_path == "":
|
|
398
|
+
return
|
|
397
399
|
if not os.path.exists(anno_path):
|
|
398
400
|
# Create the file if it doesn't exist
|
|
399
401
|
with open(anno_path, 'w') as file:
|
|
400
402
|
file.write("")
|
|
401
403
|
|
|
402
|
-
if anno_path == "":
|
|
403
|
-
return
|
|
404
404
|
self.anno_path = anno_path
|
|
405
405
|
_mianno = self.mianno
|
|
406
406
|
|
|
@@ -1664,7 +1664,7 @@ class main_window(QMainWindow, Ui_MiSleep):
|
|
|
1664
1664
|
For when I only want to save a file but not cover the current labels
|
|
1665
1665
|
"""
|
|
1666
1666
|
if self.anno_path == "":
|
|
1667
|
-
anno_path, _ = QFileDialog.
|
|
1667
|
+
anno_path, _ = QFileDialog.getOpenFileName(
|
|
1668
1668
|
self, "Select annotation file",
|
|
1669
1669
|
f"{self.config['gui']['openpath']}",
|
|
1670
1670
|
"txt Files (*.txt *.TXT)"
|
|
@@ -187,3 +187,13 @@ def identify_startend_color(dict_, state_name, end=False):
|
|
|
187
187
|
return dict_[state_name]
|
|
188
188
|
else:
|
|
189
189
|
return "blue"
|
|
190
|
+
|
|
191
|
+
def get_base_path(file_path):
|
|
192
|
+
"""
|
|
193
|
+
Remove the final .txt or .xlsx part from a file path and return the directory.
|
|
194
|
+
"""
|
|
195
|
+
import os
|
|
196
|
+
base, ext = os.path.splitext(file_path)
|
|
197
|
+
if ext in ['.txt', '.xlsx', '.mat', '.edf', '.csv']:
|
|
198
|
+
return base
|
|
199
|
+
return file_path
|
|
@@ -11,7 +11,7 @@ MAINTAINER_EMAIL = "swang@gmail.com"
|
|
|
11
11
|
URL = "https://github.com/BryanWang0702/MiSleep/"
|
|
12
12
|
LICENSE = "BSD (3-clause)"
|
|
13
13
|
DOWNLOAD_URL = "https://github.com/BryanWang0702/MiSleep/"
|
|
14
|
-
VERSION = "0.2.
|
|
14
|
+
VERSION = "0.2.11"
|
|
15
15
|
|
|
16
16
|
INSTALL_REQUIRES = [
|
|
17
17
|
"numpy>=1.18.1",
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|