Frequency-domain cosine-tapered (raised-cosine) FIR filter design. More...


Go to the source code of this file.
Classes | |
| class | UTILSLIB::CosineFilter |
| Creates a cosine filter response in the frequency domain. More... | |
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
Frequency-domain cosine-tapered (raised-cosine) FIR filter design.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
CosineFilter assembles an FIR magnitude response directly in the frequency domain by raising a rectangular pass-band to a cosine-tapered transition region and then mapping the result back to the time domain via an inverse FFT. The taper width controls the trade-off between transition steepness and stop-band ripple: wide transitions give a smoother roll-off and very low side-lobes, narrow transitions sharpen the cutoff at the cost of Gibbs-style ringing.
Because the design is symmetric in frequency, the resulting impulse response is linear-phase (Type I), so any DC group delay can be removed exactly by a forward / time-reverse pass — see FilterKernel::applyFFTFilter and FirFilter::applyZeroPhase. The class produces both the time-domain coefficients (m_vecCoeff) and their zero-padded FFT (m_vecFftCoeff) ready for overlap-add use.
Definition in file cosinefilter.h.