MCPcopy Index your code
hub / github.com/mne-tools/mne-python / _compute_normalized_phase

Function _compute_normalized_phase

mne/preprocessing/ctps_.py:12–25  ·  view source on GitHub ↗

Compute normalized phase angles. Parameters ---------- data : ndarray, shape (n_epochs, n_sources, n_times) The data to compute the phase angles for. Returns ------- phase_angles : ndarray, shape (n_epochs, n_sources, n_times) The normalized phase angles.

(data)

Source from the content-addressed store, hash-verified

10
11
12def _compute_normalized_phase(data):
13 """Compute normalized phase angles.
14
15 Parameters
16 ----------
17 data : ndarray, shape (n_epochs, n_sources, n_times)
18 The data to compute the phase angles for.
19
20 Returns
21 -------
22 phase_angles : ndarray, shape (n_epochs, n_sources, n_times)
23 The normalized phase angles.
24 """
25 return (np.angle(hilbert(data)) + np.pi) / (2 * np.pi)
26
27
28def ctps(data, is_raw=True):

Callers 2

test_ctpsFunction · 0.90
ctpsFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_ctpsFunction · 0.72