Bandwidth of PSD

Hi, in the doc of psd_multitaper it says


Does that mean by default, the bandwidth is 8 for it says the half-bandwidth is 4?

1 Like

Hi, @BarryLiu97,
I agree that the documentation could be clearer with respect to the bandwith multitaper parameters. In this case the bandwidth argument and the default half-bandwidth are different things. Looking at the code it seems that the “window half-bandwidth” that the docstring refers to is the “time half-bandwidth product”, defined as:

TW = N * f / 2

where N is window size (in seconds) and f is frequency resolution in Hz (“bandwidth”).

So, the default bandwidth (and thus default frequency smoothing) is variable because it depends on time half-bandwidth product, which is a product of frequency bandwidth and signal length. For a 1-s window length a time half-bandwidth product of 4 means that the bandwidth is 8 (± 4 Hz frequency smoothing), but for a 0.5 s window that bandwidth would be 16 (± 8 Hz frequency smoothing).

Why is the default time half-bandwidth product 4? This seems to be a common default (among few others) in many multitaper applications and it results in 7 tapers being used (2 * TW - 1).

I’ll try to submit a PR next week to clarify mne docs with respect to bandwidth parameters.

1 Like

Yeah, it is pretty confusing sometimes. In the calculation of PSD and CSD, the parameter is bandwidth, but in tfr mne.time_frequency.tfr_multitaper — MNE 0.24.1 documentation, the Time x (Full) Bandwidth product is used.

1 Like