eelbrain.resample(ndvar, sfreq, npad='auto', window=None, pad='edge', name=None, n_jobs=1)

Resample an NDVar along the time dimension

  • ndvar (NDVar) – Input data, with UTS time dimension.

  • sfreq (float) – New sampling frequency.

  • npad (int | Literal['auto']) – Number of samples for padding at the beginning and end (default is determined automatically).

  • window (str | tuple) – Window applied to the signal in the fourier domain (default is no window; see scipy.signal.resample()).

  • pad (str) – Padding method (default 'edge'; see numpy.pad() mode parameter).

  • name (str) – Name for the new NDVar (default is

  • n_jobs (str | int) – Parameter for mne.filter.resample().

Return type:



If padding is enabled, this function uses mne.filter.resample(). If not, scipy.signal.resample() is used directly.

This function can be very slow when the number of time samples is uneven (see scipy.signal.resample()). Using npad='auto' (default) ensures an optimal number of samples.