new_sfreq value for compute_source_psd

Dear MNE users,

I would like to use compute_source_psd function. If my sampling rate is 256 Hz, what it the correct value for new_sfreq?

In the code as follows, new_sfreq is 90, in this case, n_fft becomes 360. What number is your recommend for new_sfreq in the case of sampling rate is 256Hz?

new_sfreq = 90.
n_fft = next_fast_len(int(round(4 * new_sfreq)))
noise_cov = mne.compute_raw_covariance(raw)
inverse_operator = mne.minimum_norm.make_inverse_operator(, forward=fwd, noise_cov=noise_cov, verbose=True)
stc_psd, sensor_psd = mne.minimum_norm.compute_source_psd(
raw, inverse_operator, lambda2=lambda2,
n_fft=n_fft, dB=False, return_sensor=True, verbose=True)


Hi @kyuwanchoi,
do you plan to resample your signal? You seem to be using and example where this is done (this one), and the new_sfreq variable is used to set the new sampling rate of the data (most likely - to reduce computation time of compute_source_psd). If you do not plan to resample the data - you don’t have to use the new_sfreq just set your n_fft as you prefer (it controls the size of the welch / multitaper window).

mmagnuski, I see. thanks for your reply. It is very helpful for me. Kyu!