Skip to main content

EEG preprocessing pipeline on Python

Project description

Build docker

docker run --rm -it -v $(pwd):/usr/src/project dtyoung/eegprep /bin/bash docker run -u root --rm -it -v $(pwd):/usr/src/project dtyoung/eegprep /bin/bash

remove

docker rmi dtyoung/eegprep

Mounted folder in /usr/src/project

How to convert a function from MATLAB to Python

  1. Get a MATLAB file to load and process an EEG file

  2. Convert the code using GPT4 or when short Copilot and test in a Notebook. Once the code runs without erroring, move to 3.

  3. Use the Jupyter code to create a Python file (not notebook) to load the same file as MATLAB and process it as well (in plain Python, not in a subfunction)

  4. Start the debugger in both and compare. Note that it is better to use the debugger on Python file than Jupyter Notebook (could not get it to stop)

  5. Once the result is the same, package the Python code in a function with the same name as MATLAB

  6. Write the function to compare (see example) and the helper Python function to load the file (note that there could be a general Python helper function)

Install package

Packaging was done following the tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/ with setuptools

To install the package, run:

pip install eegprep

Test

use tests/main_compare.m

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

eegprep-0.0.4.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eegprep-0.0.4-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file eegprep-0.0.4.tar.gz.

File metadata

  • Download URL: eegprep-0.0.4.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for eegprep-0.0.4.tar.gz
Algorithm Hash digest
SHA256 13d506be4fd1dd2528536c6a45ea6db4ee6266db890f4282d53e66eba2dd6b76
MD5 17567facb440686b9923ad4d6a5bd7b7
BLAKE2b-256 8eb7cbd1a0100e58bc0ac3bb5a85b28a8690cbe9beb417d5649cad4cbf886532

See more details on using hashes here.

File details

Details for the file eegprep-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: eegprep-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for eegprep-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eb59538bd5841f96ed93d45ec8d115fc821bedc195abfa6777154092cbc0e6b9
MD5 ab2235a8edd70ec33ae91a4477d3e076
BLAKE2b-256 dc62639c03292fae44570e9bdb7e3f3ab7c0b2b9ce69eb1a16333e87518c7a57

See more details on using hashes here.

Supported by

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