v2.0.0
Loading...
Searching...
No Matches
cosinefilter.h File Reference

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

#include "dsp_global.h"
#include <Eigen/Core>
Include dependency graph for cosinefilter.h:
This graph shows which files directly or indirectly include this file:

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).

Detailed Description

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

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

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.