Skip to main content

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

Input wave

Output graph

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.

Release files for fourier-sine 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fourier-sine 0.4.0
File Size Uploaded
fourier-sine-0.4.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fourier-sine 0.4.0
File Interpreter ABI Platform
fourier_sine-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.6 kB

Release files / fourier-sine-0.4.0.tar.gz

Download URL fourier-sine-0.4.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e7334517ac5a90afbc460b7815bccdb18d0ca2d59375bc8cc36ffac570ecf12b
BLAKE2b-256 checksum
How to use checksums
6496492664564dc92596b245b2640d9bcee47cba312752b22bf92083077aba12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-56-generic

Release files / fourier_sine-0.4.0-py3-none-any.whl

Download URL fourier_sine-0.4.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2b0add096ab85d95ae39a6ea68955415983cff79602804483978fdd82246e28
BLAKE2b-256 checksum
How to use checksums
9bde17a6a04431d86c0ace00b40bcf4855fb587437fe66e0cc24dd184b050f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.6 Linux/5.15.0-56-generic

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page