MiSleep is for EEG/EMG signal processing and visualization
The name 'MiSleep' is from 'Mice Sleep' and sounds like 'my sleep'.
pip install misleep
Find the directory where you installed misleep, run
python -m misleep
If you use the miniconda or anaconda, the path will be like D:/miniconda3/envs/misleep/Lib/site-packages
.
See https://bryanwang.cn/MiSleep/ for a simple documentation.
- Free self-define data structure
You can organize your data with matlab structure like this:
data.EEG = AN_ARRAY_OF_EEG_DATA;
data.EMG_DIFF = AN_ARRAY_OF_EMG_DIFFERENTIAL_DATA;
% Channel name must be the same with you defined above
data.channels = {'EEG' 'EMG_DIFF'};
% Sampling frequency for each channel of data
data.sf = {256 256};
% Acquisition time of your data
data.time = {'20240409-18:00:00'};
Or if your data format is .edf
, misleep will also support well.
- Event Detection
For sleep spindle and sleep slow-wave activities detection, you can check the tools menu for event detection. The auto stage will coming soon.
- Self-define
config.ini
There is a config.ini in the root directory of MiSleep source package, multiple parameters can be self define there, check config.ini for detail.
- Auto stage
Finally, now we have the auto stage function! Check it in the tool. The overall test accuracy of NREM and Wake is higher than 90%, and for REM, the accuracy is higher than 80%. Currently the model's result is rather fragmented in the state transition segments, we will add some constraints to fix this.
Future: Open for suggestions :).
If you use this software, please cite it as below. Xueqiang Wang. (2024). BryanWang0702/MiSleep. Zenodo. https://doi.org/10.5281/zenodo.14511905