This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Converting Frites' outputs to MNE-connectivity. | |
""" | |
import numpy as np | |
import xarray as xr | |
def conn_frites_to_mne(conn): | |
"""Conversion of Frites' connectivity outputs to MNE-connectivity. | |
For performing the conversion to MNE-Python this function requires the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
try: | |
import cupy as cp | |
from cusignal.convolution.convolve import fftconvolve | |
except: | |
cp = np | |
from scipy.signal import fftconvolve | |
np.asnumpy = np.asarray |