GithubHelp home page GithubHelp logo

FFT producing incorrect results about jsyn HOT 4 CLOSED

philburk avatar philburk commented on July 23, 2024
FFT producing incorrect results

from jsyn.

Comments (4)

salk31 avatar salk31 commented on July 23, 2024 1

Hello, I was curious about this one so I compared the FFT in jsyn to the output from Apache commons and the DFT from https://www.nayuki.io/page/how-to-implement-the-discrete-fourier-transform and those two match to many decimal places while not obvious to spot a match with the jsyn FFT. Is the jsyn version doing something special or should they match? I'm up for trying to fix if any interest.

from jsyn.

salk31 avatar salk31 commented on July 23, 2024 1

So only six years after you said it, I can now only see a problem with the scaling. If I effectively disable it (-1 for sign and double the output) all three implementations match. I'm not sure what the sign or the scaling is for. Looking at places it is called one just has a TODO next to it "transform(1, n, ar, ai); // TODO -1 or 1"

from jsyn.

philburk avatar philburk commented on July 23, 2024 1

The scaling for the FFT and IFFT is kind of arbitrary.
I have seen lots of different approaches.
We want the IFFT(FFT) to return the original signal.
JSyn scales the FFT by 2/n and IFFT by 1/2. code

from jsyn.

philburk avatar philburk commented on July 23, 2024

James was seeing smearing across bins, which I am not seeing. But I am seeing errors in scaling.

from jsyn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.