Packages for signal decomposition


What are the packages out there for decomposing a signal into a basis of functions? Fourier basis, Radial basis, Cosine basis, …

I need to decompose a signal into a set of basis functions and coefficients, manipulate these coefficients, and reconstruct a new signal with the same basis. I found BasisFunctionExpansions.jl but it currently doesn’t export an API to reconstruct a signal given a set of coefficients and a basis.

Interestingly, Python SciPy’s radial basis functions doesn’t seem to have this feature either.


dct and fft and their inverses are both built-in (for cosine and fourier bases respectively) - but I’m assuming there’s something I’m missing about what you’re looking for.


@ssfrr I need to reduce the dimensionality of the signal. WIth radial basis functions for example, we can pick the number of basis in the expansion to be smaller than the number of points in the signal. If I have a very smooth signal represented by 1000-vector, I can represent it with let’s say only 10 coefficients in the basis. My ultimate goal is to perform FPCA, which is basically a fancy name for PCA on the coefficients of the expansion.

If you know a package for FPCA, that also solves my problem.


Looks like MultivariateStats provides a PCA type and also get the projection matrix to convert back to the original space. so you’d have:

Original dataset (1000xN) -> FFT(1000xN) -> PCA(10xN) -> manipulate stuff(10xN) -> project (1000xN) -> IFFT (1000xN)

If you know your signal is real-valued you can use rfft and irfft so your spectra is half the length.

(sorry if this is obvious or dumb or not what you’re looking for. I’ve never used FPCA before and am mostly thinking out loud).


Thanks @ssfrr, I will be using Scipy’s splrep for now, I am already using MultivariateStats.jl for the PCA part. :slight_smile: