Fourier Analysis with sine waves
Project description
Fourier Analysis
This works nicely for sine waves. The series output was tested with plotly's line plot but can be used with any plotting library. It should output a new series (in list of floats format) with maximums corresponding to the frequency (highly accurate) and amplitude (usually 90%+ accurate) of the input series.
Usage
Expected input: a path with a file of csv with one row only of floats. Output:
import fourier_sine
series = fourier_sine.create_random_series()
output = fourier_sine.fourier_analysis(series)
For inspection you can also:
import plotly
plotly.plot(series, kind='line', title='input').show()
plotly.plot(output, kind='line', title='output').show()
Input series composed of three sine waves: frequency 95 amplitude 967, frequency 140 amplitude 731, frequency 170 amplitude 53
Notice that the amplitude of the first two waves listed, 967 and 731, respectively reflect the frequency of 95 an 140. Unfortunately, for this example, the amplitude of 53 is too small to detect visually from this graph at the 170 frequency.
Credits: Andrew Matte and Bob Matte, implemented after watching the youtube video The Algorithm That Transformed The World on the Veritasium channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fourier-sine-0.4.0.tar.gz
.
File metadata
- Download URL: fourier-sine-0.4.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-56-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7334517ac5a90afbc460b7815bccdb18d0ca2d59375bc8cc36ffac570ecf12b |
|
MD5 | 3844d1fb0c3cd60e351e4ece57a9e5bf |
|
BLAKE2b-256 | 6496492664564dc92596b245b2640d9bcee47cba312752b22bf92083077aba12 |
File details
Details for the file fourier_sine-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: fourier_sine-0.4.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-56-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2b0add096ab85d95ae39a6ea68955415983cff79602804483978fdd82246e28 |
|
MD5 | 27e27e8c83b3b98232c7c2dffc887d6f |
|
BLAKE2b-256 | 9bde17a6a04431d86c0ace00b40bcf4855fb587437fe66e0cc24dd184b050f73 |