tidy3d.dft_spectrum

tidy3d.dft_spectrum(time_series, dt, freqs)

Computes the frequency spectrum associated to a time series directly using the discrete fourier transform.

Note

The DFT spectrum can be computed over an arbitrary list of frequencies, but is much more inefficient than FFT. Use sparingly.

Parameters
  • time_series (array_like) – 1D array of time-dependent data.

  • dt (float, optional) – Step in time over which the time series is recorded.

  • freqs (array_like) – Array of frequencies to sample the spectrum at.

Returns

spectrum – Array of same size as freqs giving the complex-valued spectrum.

Return type

array_like