electricpy.funcfft

electricpy.funcfft(func, minfreq=60, maxmult=15, complex=False)[source]

FFT Evaluator for Callable Functions.

Given the callable function handle for a periodic function, evaluates the harmonic components of the function.

Parameters:
func : function

Callable function from which to evaluate values.

minfreq : float, optional

Minimum frequency (in Hz) at which to evaluate FFT. default=60

maxmult : int, optional

Maximum harmonic (multiple of minfreq) which to evaluate. default=15

complex : bool, optional

Control argument to force returned values into complex format.

Returns:

  • DC (float) – The DC offset of the FFT result.

  • A (list of float) – The real components from the FFT.

  • B (list of float) – The imaginary components from the FFT.