-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature WPLI #411
Feature WPLI #411
Conversation
…ponding TestCase-suite
…nits for artifical data in WPLITestCase;; added temparali plots for visual comparsion of results in test-functions
…and 3) all temporarly included plots
…he wpli;; removed negative frequency removal, to return frequencies in range of [-f_0 / 2; f_0 / 2], with f_0 as samplling frequency
…requencies from fft-vectors
…arious variables to meet lowercase-convention;; use now assert_all_close instead of assert_almost_equal like numpy recomended
…se;; updated comments
…fft, to avoid negative frequency removal by hand
…used for WPLI-ground-truth calculation by FieldTrip
…ameter for rfftfreq, resulting different array-sizes of wpli and freq
…on in the WPLI-TestCase;; use this multisine artificial LFP dataset besides ground-truth testing also to check, if WPLI is 0, 1 or -1 at certain frequencies;; remove now unused code
…FieldTrips ft_connectivity() and MNEs spectral_connectivity(), both using multitaper FFT, at certain frequencies
…ions in one function were made
… used artificial datasets and differenct ground-truths
Hello @ojoenlanuca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-07-13 13:12:07 UTC |
…lly, because they won't be included in this elephant-PR;; updated versions of generate_artificial_datasets and ft_connectivity -Scripts are included in the G-Node GIN elephant-date PR of the branch feature_PhaseAnalysis_WPLI
…'elephant-data' repository from the G-Node GIN server;; increased slightly the atol value in 'test_WPLI_is_zero'-testfunction because of changes in the artifical-data generation (more trials + larger trail length)
…e used just for system-paths
…factored variable names to match lowercase convention; decorated explicitly test_WPLI_raises_error_if_AnalogSignals_have_diff_sampling_rate() to be a static-method
Commits: |
Done, see: #9 Feature: Phase Analysis Dataset |
…s changed accordingly
Changes have been implemented.
Hi @ojoenlanuca , please let me know if you accept the changes done to your contribution. |
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().