transfreq.functions.compute_transfreq_manual

transfreq.functions.compute_transfreq_manual(psds, freqs, theta_chs, alpha_chs, ch_names=None, theta_range=None, alpha_range=None, method='user_method')

Compute transition frequency given a customezed cluster

Parameters:
psds: array, shape (N_sensors, N_freqs)

power spectral matrix

freqs: array, shape (N_freqs,)

frequencies at which the psds is computed

theta_chs: tuple | list of integers or string

indeces or names of the theta channels in the cluster

alpha_chs: tuple | list of integers or string

indices or names of the theta channels in the cluster

ch_names: None | list of strings (default None)

names of the channels (must be ordered as they are in psds)

theta_range: tuple | list | array | None (default None)

theta range to compute alpha coefficients (eg: (5,7), [5,7], np.array([5,7])). If None it is set automatically

alpha_range: tuple | list | array | None (default None)

alpha range to compute theta coefficients (eg: (9,11), [9,11], np.array([9,11])). If None it is set automatically

method: str (default ‘user_method’)

name the user wants to assign to the customized cluster

Returns:
tfbox: dictionary

Dictionary containing:

  • the method used to compute the cluster

  • the cluster: pandas dataframe (rows: alpha coefficients,theta coefficients, clustering labels; columns:channel names)

  • the transition frequency (tf)