nbara / python-meegkit

🔧🧠 MEEGkit: MEG & EEG processing toolkit in Python
https://nbara.github.io/python-meegkit/
BSD 3-Clause "New" or "Revised" License
181 stars 49 forks source link

[ENH] Add additional mCCA example #69

Closed johnkylecooper closed 1 year ago

johnkylecooper commented 1 year ago

Hi, thanks for the amazing toolbox! I would like to add an additional example using the MCCA implementation in python-meegkit since I was initially having trouble understanding how the implementation is used to extract an underlying signal from concatenated data matrices. Maybe this will help others when applying more complex signals to the MCCA function. The example is example #1 taken from de Cheveigné et al., 2018. I believe that the code is correct and reproduces the results shown in Figure 4. Note: this is my first pull request, so I apologize in advance if anything isn't properly implemented.

codecov[bot] commented 1 year ago

Codecov Report

Merging #69 (b36c564) into master (d9326e7) will not change coverage. The diff coverage is n/a.

:exclamation: Current head b36c564 differs from pull request most recent head 7411f0a. Consider uploading reports for the commit 7411f0a to get more accurate results

@@           Coverage Diff           @@
##           master      #69   +/-   ##
=======================================
  Coverage   78.87%   78.87%           
=======================================
  Files          22       22           
  Lines        2367     2367           
=======================================
  Hits         1867     1867           
  Misses        500      500           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

johnkylecooper commented 1 year ago

Hi, I'm happy to see that my pr has passed all but one of the tests. With regards to the test that failed, I'm not sure I can fix it on my end. Here is the error:

remote: Permission to nbara/python-meegkit.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/nbara/python-meegkit/': The requested URL returned error: 403

Best, John Kyle

nbara commented 1 year ago

Hey John, thanks for this! I will have a look asap. The doc build job should be an easy fix

nbara commented 1 year ago

Hi @johnkylecooper, the example looks great.

FWIW, you don't need to generate both the example_*.ipynb example AND the example_*.py files.

Just do you code in the .py file, and run make build-examples and the notebooks will be automatically generated from the .py files (including headers and sections).

Again, thanks for the contribution. I don't use the code in meegkit that much these days for my own work but I'm happy to keep maintaining it if it helps others 🙂

PS: the doc build fails it comes from a fork. It's a CI bug, nothing to do with your example.

nbara commented 1 year ago

https://nbara.github.io/python-meegkit/auto_examples/example_mcca_2.html#sphx-glr-auto-examples-example-mcca-2-py looking good ! ;)

johnkylecooper commented 1 year ago

https://nbara.github.io/python-meegkit/auto_examples/example_mcca_2.html#sphx-glr-auto-examples-example-mcca-2-py looking good ! ;)

Thanks! :)

Hi @johnkylecooper, the example looks great.

FWIW, you don't need to generate both the example_*.ipynb example AND the example_*.py files.

Just do you code in the .py file, and run make build-examples and the notebooks will be automatically generated from the .py files (including headers and sections).

Again, thanks for the contribution. I don't use the code in meegkit that much these days for my own work but I'm happy to keep maintaining it if it helps others 🙂

PS: the doc build fails it comes from a fork. It's a CI bug, nothing to do with your example.

Also, thanks for the tips! :) Yes, I mainly use meegkit for the preprocessing tools (for eeg recordings) and now mcca. It's very handy! I have a lot of respect for you guys who maintain open-source projects! I hope to be able to contribute more to projects in the future!

Going to delete my branch and delete the fork now.

Best, John Kyle