Code Monkey home page Code Monkey logo

fft-python's Introduction

FFT-Python

FFT Examples in Python

This tutorial covers step by step, how to perform a Fast Fourier Transform with Python.

FFT

Including

  • How to scale the x- and y-axis in the amplitude spectrum
  • Leakage Effect
  • Windowing

Real World Data Example

From

Vertical Netload Germany 2013

To

Periods in NetLoad

fft-python's People

Contributors

balzer82 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fft-python's Issues

Jupyter Notebook Cell 97

Nice job here, I appreciate your hard work. In the Jupyter Notebook Cell 97 the FFT peak is scaled to be 100 units max. That would make the FFT output match the 'peak amplitude' of the input signal, the real output of a FFT is the RMS value of the input waveform, so you are a factor of sqrt(2) too high on the FFT output. I am really not complaining, and as I said I appreciate your hard work on this.

Part one of the tutorial - amplitude goes down to 87.84 when changing frequency to 3.25 [Hertz]

Hi,

in the first part of the tutorial: if I change the frequency from 3.0 [Hertz] to 3.25:

t = np.linspace(0, 2*np.pi, 1000, endpoint=True)
f = 3.250 # Frequency in Hz
A = 100.0 # Amplitude in Unit
s = A * np.sin(2*np.pi*f*t) # Signal

I get a maximum amplitude different than 100 in the fft regime:

Yhann = np.fft.fft(hann*s)
print("(2.0*np.abs(Yhann[:N])/N).max():", (2.0 * np.abs(Yhann[:N]) / N).max())

(2.0*np.abs(Yhann[:N])/N).max(): 87.83995835994367

This probably is due to leaking, isn't it?

Apart from adjusting the sampling frequency: how else could I correct that (I have heard of using the sinc() function but am unsure how this should be performed)?

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.