metabci.brainda.algorithms.feature_analysis.freq_analysis module¶
- class metabci.brainda.algorithms.feature_analysis.freq_analysis.FrequencyAnalysis(data, meta, event, srate, latency=0, channel='all')[source]¶
Bases:
object- plot_topomap(data, ch_names, srate=-1, ch_types='eeg')[source]¶
-author: Zhou hongzhan & He Jiatong -Create on:2022-8-9 -update log:
2022-8-31 by Zhou hongzhan
- Parameters:
data – np.array, 1D array eeg data. The default is [].
ch_names – list interested channels
srate – int sample rate. The default is -1.if set as default ,the initial sample ratio will be applied
ch_types – string Type of channels,default value=’eeg’
- power_spectrum_periodogram(x)[source]¶
-author: Zhou hongzhan & He Jiatong -Create on:2022-8-9 -update log:
2022-8-31 by Zhou hongzhan
- Parameters:
x – np.array 1D data.
- Returns:
- np.array
An array of frequencies
- Pxx_dennp.array
The amplitude array respectively correspond to frequency array
- Return type:
f
- signal_noise_ratio(data=[], srate=-1, T=[], channel=[])[source]¶
-author: Zhou hongzhan & He Jiatong -Create on:2022-8-9 -update log:
2022-8-31 by Zhou hongzhan
- Parameters:
data – np.array, 1D array eeg data. The default is [].
srate – int sample rate. The default is -1.if set as default ,the initial sample ratio will be applied
T – int, ms the during time of data. The default is [].
channel – string interested channels
- Returns:
- np.array
frequency sequece.
- snrnp.array
SNR sequence
- Return type:
X1
- stacking_average(data=[], _axis=0)[source]¶
-author: Zhou hongzhan -Create on:2022-8-9 -update log:
2022-8-11 by Zhou hongzhan
- Parameters:
data – np.array (nTrials, nChannels, nTimes) EEG origin data. The default is [].
_axis – int The dimension need to be stacked. The default is 0.
- Returns:
- np.array
The data after stacked.
- Return type:
data_mean
- sum_y(x, y, x_inf, x_sup)[source]¶
-author: Zhou hongzhan -Create on:2022-8-9 -update log:
2022-8-11 by Zhou hongzhan
- Parameters:
x – np.array(1D) An array of frequencies
y – np.array(1D,SAME TYPE WITH X) The amplitude array respectively correspond to frequency array
x_inf – int Infimum of freq.
x_sup – int Supremum of freq.
- Returns:
- int
freq parameter,topomap procedure needed
- Return type:
np.mean(sum_A)