-
Get a MATLAB file to load and process an EEG file
-
Convert the code using GPT4 or when short Copilot and test in a Notebook. Once the code runs without erroring, move to 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)
-
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)
-
Once the result is the same, package the Python code in a function with the same name as MATLAB
-
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)
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==0.0.2