ft

libra_py.ft.ft(X, wspan, dw, dt)[source]

Discrete Fourier transform

We do have a number of FT and FFT functions in the Libra core, but this one may be also convenient to have

Parameters
  • X (list of floats) – data time-series

  • wspan (float) – is the range (the maximal value) of frequencies we want to compute

  • dw (float) – is the distance between the nearby points on the frequency scale

  • dt (float) – is the time step

Returns

(W, J): where

W ( list of npoints doubles): frequencies J ( list of npoints doubles): amplitudes of the cos-transform

Return type

tuple

libra_py.ft.ft2(X, wmin, wmax, dw, dt)[source]

Discrete Fourier transform

We do have a number of FT and FFT functions in the Libra core, but this one may be also convenient to have

Parameters
  • X (list of floats) – data time-series

  • wmin (float) – the minimal value of frequencies we want to compute

  • wmax (float) – the minimal value of frequencies we want to compute

  • dw (float) – is the distance between the nearby points on the frequency scale

  • dt (float) – is the time step

Returns

(W, J): where

W ( list of npoints doubles): frequencies J ( list of npoints doubles): amplitudes of the complex-transform I ( list of npoints doubles): intensities

Return type

tuple

libra_py.ft.py_cft(X, dt)[source]

Complex Discrete Fourier transform

We do have a number of FT and FFT functions in the Libra core, but this one may be also convenient to have

According to this definition: http://mathworld.wolfram.com/DiscreteFourierTransform.html

Parameters
  • X (list of floats) – data time-series

  • wspan (float) – is the range (the maximal value) of frequencies we want to compute

  • dw (float) – is the distance between the nearby points on the frequency scale

  • dt (float) – is the time step

Returns

(W, C, S): where

W ( list of npoints doubles): frequencies C ( list of npoints doubles): amplitudes of the cos-transform S ( list of npoints doubles): amplitudes of the sin-transform

Return type

tuple