Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fourier series in Python
#1
Hello everyone,

I'm new here so I hope I'm in the right place to ask some questions !

I would like to get the equation of the Fourier series of a (complex) curve.
There are a few scripts on the internet that plot the Fourier series curve at different orders, but none of them give the equation (or work). I looked for an existing function but it doesn't seem to exist .....

I have linked to this post a screenshot of a curve that I would like to get the Fourier series. As you can see, I can plot the curve, but I don't get the equation.

For those who know MatLab, I'm looking for a function like the "fit" function : https://fr.mathworks.com/help/curvefit/fourier.html

I hope that my post was clear enough ! :)

Thanks for your help !

Attached Files

Thumbnail(s)
   
Reply
#2
see: https://docs.scipy.org/doc/scipy/tutorial/fft.html
and: https://numpy.org/doc/stable/reference/g....fft2.html
Reply
#3
(Mar-18-2022, 09:45 AM)Larz60+ Wrote: see: https://docs.scipy.org/doc/scipy/tutorial/fft.html
and: https://numpy.org/doc/stable/reference/g....fft2.html

Maybe I don't get it, but those links are the FFT, and I'm looking for Fourier series Confused (maybe we can get the Fourier series from the FFT ?)
Reply
#4
Armandito Wrote:Maybe I don't get it, but those links are the FFT, and I'm looking for Fourier series Confused (maybe we can get the Fourier series from the FFT ?)

From difference between.org:
Quote:Difference between Fourier Series and Fourier Transform

Fourier series is an expansion of periodic signal as a linear combination of sines and cosines while Fourier transform is the process or function used to convert signals from time domain in to frequency domain. Fourier series is defined for periodic signals and the Fourier transform can be applied to aperiodic (occurring without periodicity) signals. As mentioned above, the study of Fourier series actually provides motivation for the Fourier transform.

I used fft in my work many years ago (almost 30) while working R & D in spectra-chemical instrumentation design and honestly can't remember enough to properly answer your question.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python ValueError The value of a Series is abmbiguous nhl66pens 2 2,241 Oct-17-2020, 02:46 PM
Last Post: jefsummers
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 1,924 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43
  Convert quarterly time series to monthly time series donnertrud 1 5,194 May-22-2020, 10:16 AM
Last Post: pyzyx3qwerty
  Smoothing Fourier muhsin 0 2,188 Oct-25-2017, 05:21 PM
Last Post: muhsin
  tutorial series python directx hsunteik 2 5,814 Jan-12-2017, 09:06 AM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020