chipmuenk / pyfda

Python Filter Design Analysis Tool
http://chipmuenk.github.io/
MIT License
643 stars 94 forks source link

Single-sided spectra of complex-valued signals are not scaled correctly (y[n] tab) #242

Closed chipmuenk closed 2 months ago

chipmuenk commented 11 months ago

When e.g. plotting the time signal $\exp(j \pi n)$ in the y[n] tab, the amplitude in the frequency view is twice the value it should be. For negative frequencies, the signal does not show up at all in the frequency view.

Workaround: Display two-sided spectra

Solution: Calculate the single-sided spectrum by adding negative and positive frequency components instead of simply scaling by two. This also takes care of correct DC-scaling.

chipmuenk commented 2 months ago

Fixed in v0.9.0