wecopttool.td_to_fd

td_to_fd(td, fft=True, zero_freq=True)[source]

Convert a real array of time-domain responses to a complex array of Fourier coefficients.

If zero_freq = False (not default), the mean (DC) component X0 is excluded, and the matrix/vector length is reduced by 1.

Opposite of wecopttool.fd_to_td()

Parameters:
  • td (ArrayLike) – Real array of time-domains responses.

  • fft (bool | None) – Whether to use the real FFT.

  • zero_freq (bool | None) – Whether the mean (DC) component is returned.

Return type:

ndarray

See also

fd_to_td