elephant
elephant copied to clipboard
Feature WPLI
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().
Hello @ojoenlanuca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
elephant/test/test_phase_analysis.py
:
Line 416:25: E127 continuation line over-indented for visual indent
Comment last updated at 2022-07-13 13:12:07 UTC
Could you have a look at this PR and share your feedback/opinion about it? @mdenker , @rjurkus , @kohlerca
Coverage: 87.497% (+0.04%) from 87.457% when pulling c7bd4df4e935aeb322b6c4d3680d8e591c36b50c on INM-6:feature_WPLI into 99d3555fa48246e30bfa369f4e28fa0c484e6209 on NeuralEnsemble:master.
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
~~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
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: