Skip to main content

MiSleep: Mice Sleep EEG/EMG visualization, scoring and analysis.

Project description

MiSleep

MiSleep is for EEG/EMG signal processing and visualization

logo

Get start

pip install misleep

Find the directory where you installed misleep, run

python -m misleep

See https://bryanwang.cn/MiSleep/ for a simple documentation.

New features

  1. New data structure

You can save the original data as a new data structure (See Data save protocol). Where you can add the channels' name, sampling rate and the acquisition time into the original data.

  1. Annotate more details

Here we provide the start_end mode as a more precise way to annotate the event such as Slow Wave Activities or Spindle, e.t. You can select the Start-End mode in the Annotation tool dock and click wherever in the signal area to annotate the event.

  1. Tool bar dock

dock

Now you can move the toolbar to wherever you want.

  1. Color for state

statecolor

Different color background for different sleep states. Now the color map is:

Init: White; NREM: Orange; REM: Blue; Wake: Red.

  1. 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.

  1. 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.

Future: Auto stage. Open for suggestions :).

Data save protocol

You need to use matlab for data saving, the final data should be a structure.

If you are using TDT for recording, here is the example script to save the data.

tdt_data = ...

data.EEG_F = tdt_data.streams.EEG1.data(1, :);
data.EEG_P = tdt_data.streams.EEG1.data(2, :);
data.EEG_DIFF = data.EEG_F - data.EEG_P
data.EMG_1 = tdt_data.streams.EMG1.data(1, :);
data.EMG_2 = tdt_data.streams.EMG1.data(2, :);
data.EMG_DIFF = data.EMG_1 - data.EMG_2;
data.REF = data.streams.mou1.data(1, :);
data.channels = {'EEG_F' 'EEG_P' 'EEG_DIFF' 'EMG_1' 'EMG_2' 'EMG_DIFF' 'REF'};
data.sf = {305.1758 305.1758 305.1758 305.1758 305.1758 305.1758 305.1758};
data.time = {'20240409-18:00:00'};  

And an example of result data:

Alt text

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

misleep-0.1.20.tar.gz (88.4 kB view details)

Uploaded Source

Built Distribution

misleep-0.1.20-py2.py3-none-any.whl (112.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file misleep-0.1.20.tar.gz.

File metadata

  • Download URL: misleep-0.1.20.tar.gz
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for misleep-0.1.20.tar.gz
Algorithm Hash digest
SHA256 f27cacb1b58d7c2b3335a49f1dbaa48adb5601ded01cf6ade060cbd2a6502934
MD5 fbec77ec177c12d4c68c9634b6371516
BLAKE2b-256 f1a7fe72eaed459af0a0da64a5138c051c1d938bb176f2cce54c2a9155148a1d

See more details on using hashes here.

File details

Details for the file misleep-0.1.20-py2.py3-none-any.whl.

File metadata

  • Download URL: misleep-0.1.20-py2.py3-none-any.whl
  • Upload date:
  • Size: 112.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for misleep-0.1.20-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6f47427c06e136d00c493bb915a59f6b1fb1804c25d0133a1b36e129c07ee5e0
MD5 edef3dbc2693d4f7c4c1226f9bb3aec1
BLAKE2b-256 23999573f8d08d0dfcdb741396e10b3eb113792d516b0e8fc75071de8ea9e7a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page