Setting the size of a window segment using multitaper

MNE 1.5.1, macOS 13.6.2

Hi MNE community,

I am attempting to compute the power spectral density for trials of data (each lasting approx. 4-10 s) using the multitaper function psd_array_multitaper(). My goal is to control the window size/bins for the analysis between trials so that they are comparable, despite the trials being of variable duration.

I previously used psd_array_welch() and was able to control the window size using nperseg, but note that such a parameter doesn’t seem to exist for psd_array_multitaper(). Could you please explain the differences in window implementation between the two functions? Is psd_array_multitaper() only intended to be applied to an individual window/segment, rather than a full set of trial data?

Thanks,
Jack

Hi Jack,
If I am not mistaken,
When using psd_arra_multitaper(), the Slepian tapers are computed along the entire length of your data (in your case data of 4-10 sec) that’s why you don’t choose the window size for that function. Typically the multi taper approach is very interesting for epoched data.

Hi Sam,

I see, perhaps a conceptual misunderstanding on my part…

However, wouldn’t it still be unwise to compare the output of psd_array_multitaper() that is performed on two segments of different lengths (e.g. 4s vs 10s)? I imagine the different segment lengths would mean that the frequency resolutions of each output is variable.

So is the correct usage of this function - as far as comparisons are concerned - to ensure that your input data/single segments are the same length prior to running it?

Thanks!

Hi,

I believe, thinking in terms of FFT, for your frequency resolution, given N samples in 1 second recorded with sampling frequency Fs, you are expected to have a frequency resolution from Fs/4N to Fs/10N depending on the epoch.

Your upper and lower bounds for the frequencies you can analyze are always the same assuming you have the same sampling frequency Fs regardless of the duration of each epoch.

Therefore, I would presume that calling psd_array_multitaper(fmin=fmin, fmax=fmax, bandwidth=Fs/4N) no matter the epochs, should be safe and render the results comparable. However, the default bandwidth value has an 8 there in the equation which I am not sure what it stands for. Maybe someone else could provide more info.