mne.time_frequency.psd_array_welch

mne.time_frequency.psd_array_welch(x,  sfreq,  fmin=0,  fmax=inf,  n_fft=256,  n_overlap=0,    n_per_seg=None,   n_jobs=None,   average='mean',   window='hamming',   ,  verbose=None)

计算脑电信号的功率谱密度,使用Welch’s 方法

x, 数组形式, shape=(…, n_times)

用于计算PSD的数据。

sfreq,float形式

采样频率

fmin,float形式

The lower frequency of interest。

fmax,float形式

The upper frequency of interest。

n_fft,int形式

The length of FFT used, must be  >= n_per_seg (default: 256). The segments will be zero-padded if n_fft > n_per_seg.

使用的FFT长度,必须大于等于n_per_seg(默认值:256)。如果n_fft > n_per_seg,则被零填充。

n_overlap,int形式

The number of points of overlap between segments. Will be adjusted to be <= n_per_seg. The default value is 0.

每一段脑电信号之间的重叠点数。数值将被调整为<=n_per_seg。默认值为0。

n_per_seg ,int类型或None

Length of each Welch segment (windowed with a Hamming window). Defaults to None, which sets n_per_seg equal to n_fft.

每个Welch段的长度(用Hamming窗口)。默认设置为None,将n_per_seg设置为与n_fft相等。

n_jobs,int类型或None 

The number of jobs to run in parallel. If -1, it is set to the number of CPU cores. Requires the joblib package. None (default) is a marker for ‘unset’ that will be interpreted as n_jobs=1 (sequential execution) unless the call is performed under a joblib.parallel_backend() context manager that sets another value for n_jobs.
要并行运行的作业数。如果为-1,则设置为CPU内核数。需要joblib包。None(默认)是“unset”的标记,除非在joblib下执行调用,否则它将被解释为n_jobs=1(顺序执行)。parallel_backend()上下文管理器,为n_jobs设置另一个值。

average str类型或None 

How to average the segments. If mean (default), calculate the arithmetic mean. If median, calculate the median, corrected for its bias relative to the mean. If None, returns the unaggregated segments.

如何平均分段。如果是平均值(默认值),则计算算术平均值。如果是中值,则计算中值,校正其相对于平均值的偏差。如果无,则返回未聚合的线段。

你可能感兴趣的:(python)