GithubHelp home page GithubHelp logo

jjgoings / pade Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 4.0 232 KB

do the Fourier transform using the method of Padé approximants

License: MIT License

Python 100.00%
fourier signal pade-approximant fourier-transform pade frequency time

pade's Introduction

Well, hello there.

Unsolicited advice: be the person to pronounce "meow" in "homeowner".

pade's People

Contributors

jjgoings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pade's Issues

Sign of sine problem

Interestingly, scipy.fftpack predicts a negative sign for the three peaks of the discrete Fourier transform of the function sin(2t) + sin(4t) + sin(8t). Currently the Padé code predicts positive signs. The reason for this is in lines 68 and 69 - np.poly1d contracts the a coefficients with the wrong-order phase terms (Eq. 29 of Bruner et al). np.poly1d(np.flip(a)) and likewise for b fixes the issue. This also fixes imaginary-component sign issues with several other functions I've tested.

Why the sign of the peaks of the FT of a simple sum of sine functions would be negative is beyond me, and I'd like to understand it better. Another example of this is sin(t) + cos(2t) + sin(3t) + cos(4t). You get alternating imaginary and real peaks at ω = {1,2,3,4}, as expected, but again the imaginary peaks (corresponding to the sine) are all negative. Padé also has a lot of difficulty with this example, even with damping.

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.