elephant icon indicating copy to clipboard operation
elephant copied to clipboard

Feature WPLI

Open ojoenlanuca opened this issue 3 years ago • 6 comments

To further increase the number of functions in the phase_analysis module of ‘elephant’, we implemented the ‘weighted_phase_lag_index()’-function to calculate the WPLI, which is a measure of phase-synchronization and based on the imaginary part of the complex-valued cross-spectrum of two signals. This measure was first introduced in ‘An improved index of phase-synchronization for electrophysiological data in the presence of volume-conduction, noise and sample-size bias’ by Vinck et al., 2011. Correctness was tested among other things via ‘ground-truth’-testing with: MATLABs package FieldTrip and its function ft_connectivity_wpli() and its wrapper ft_connectivity(); as well as with python package MNE and its function spectral_connectivity().

ojoenlanuca avatar Mar 16 '21 08:03 ojoenlanuca

Hello @ojoenlanuca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 416:25: E127 continuation line over-indented for visual indent

Comment last updated at 2022-07-13 13:12:07 UTC

pep8speaks avatar Mar 16 '21 08:03 pep8speaks

Could you have a look at this PR and share your feedback/opinion about it? @mdenker , @rjurkus , @kohlerca

ojoenlanuca avatar Mar 16 '21 10:03 ojoenlanuca

Coverage Status

Coverage: 87.497% (+0.04%) from 87.457% when pulling c7bd4df4e935aeb322b6c4d3680d8e591c36b50c on INM-6:feature_WPLI into 99d3555fa48246e30bfa369f4e28fa0c484e6209 on NeuralEnsemble:master.

coveralls avatar Jul 21 '21 11:07 coveralls

Commits: https://github.com/NeuralEnsemble/elephant/pull/411/commits/a3d01b5214e4886f5a195c136017883e71a7b949 https://github.com/NeuralEnsemble/elephant/pull/411/commits/09f05965ff0364be5df25a61b46e1bf0a9c46dae see updated citations in documentation: https://elephant-docs-development.readthedocs.io/en/feature_wpli/reference/phase_analysis.html

Moritz-Alexander-Kern avatar Jul 12 '22 11:07 Moritz-Alexander-Kern

~~This PR on GIN, elephant-data has to be merged in order to continue with this PR.~~

~~Since work on WPLI was started, the structure of elephant-data was changed. Work on this will continue once the GIN PR was adapted.~~

Done, see: #9 Feature: Phase Analysis Dataset

Moritz-Alexander-Kern avatar Jul 12 '22 12:07 Moritz-Alexander-Kern

Hi @ojoenlanuca ,

please let me know if you accept the changes done to your contribution. If so, this PR is ready to be merged. :tada:

Moritz-Alexander-Kern avatar Jul 13 '22 13:07 Moritz-Alexander-Kern