tmdsimpy.utils.harmonic.get_fourier_coeff

tmdsimpy.utils.harmonic.get_fourier_coeff(h, x_t)

Calculates the Fourier coefficients corresponding to a time series.

Parameters:
h(H,) numpy.ndarray sorted

Harmonics considered, 0th harmonic must be first if included

x_t(Nt, N) numpy.ndarray

Time series of each DOF. Rows are time instants over a cycle (see Notes). Columns are DOFs.

Returns:
v(Nhc, N) numpy.ndarray

Containing Fourier coefficients of harmonics h (rows) and DOFs (columns).

See also

tmdsimpy.jax.harmonic_utils.get_fourier_coeff

Implementation with JAX and JIT compilation support.

Notes

The number of harmonic components is Nhc = tmdsimpy.utils.harmonic.Nhc(h)

The normalized time instants between [0,1) for a cycle can be calculated as tau = numpy.linspace(0,1,Nt+1)[:-1].