# Can you decompose a wave approximately?

I have data which looks like composition of sine waves.

I need to decompose it to fewest possible sine waves that would give me tolerable error.

The picture is of a half-period. Each half-period would be different so I need to analyze each half-period separately as if they arent related (this is empirical limitation).

The data has no physical meaning so the decomposition would not be precise ever, also there is no energy for proper Fourier transform.

Is there a software package (preferably in python) that can find a function that decomposes approximately given wave with error sigma? if not what would you suggest?

• Depending on how you measure error, the FT will be a good candidate for the solution. The meaning of "no energy" is obscure.
– whuber
Commented Nov 29, 2022 at 19:22
• I don't think FT can do approximate decomposition though? Can it? Commented Nov 30, 2022 at 12:47
• Pick a subset of the components, such as those with the largest coefficients. That's the same idea as PCA.
– whuber
Commented Nov 30, 2022 at 15:27