Skip to content
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

[Fix] Use default tolerances for np.testing.allclose() in WPLI ground truth test #572

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions elephant/test/test_phase_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,22 +496,22 @@ def test_WPLI_ground_truth_consistency_real_LFP_dataset(self):
self.lfps1_real, self.lfps2_real, self.sf1_real)
np.testing.assert_allclose(
wpli, self.wpli_ground_truth_ft_connectivity_wpli_real,
atol=self.tolerance, rtol=self.tolerance, equal_nan=True)
equal_nan=True)
# np.array-input
with self.subTest(msg="np.array input"):
freq, wpli = elephant.phase_analysis.weighted_phase_lag_index(
self.lfps1_real.magnitude, self.lfps2_real.magnitude,
self.sf1_real)
np.testing.assert_allclose(
wpli, self.wpli_ground_truth_ft_connectivity_wpli_real,
atol=self.tolerance, rtol=self.tolerance, equal_nan=True)
equal_nan=True)
# neo.AnalogSignal-input
with self.subTest(msg="neo.AnalogSignal input"):
freq, wpli = elephant.phase_analysis.weighted_phase_lag_index(
self.lfps1_real_AnalogSignal, self.lfps2_real_AnalogSignal)
np.testing.assert_allclose(
wpli, self.wpli_ground_truth_ft_connectivity_wpli_real,
atol=self.tolerance, rtol=self.tolerance, equal_nan=True)
equal_nan=True)

def test_WPLI_ground_truth_consistency_artificial_LFP_dataset(self):
"""
Expand Down