aspcore.fouriertransform.dft.real_vec_to_dft_domain

aspcore.fouriertransform.dft.real_vec_to_dft_domain(vec_real, even=True, scale=True, removed_freqs=0)

Isomorphism between a real-valued vector and a complex DFT domain vector

Note that this is not a Fourier transform, but merely a way to treat frequency domain vectors as real-valued vectors.

Parameters:
  • vec (ndarray of shape (real_vec_len, ...)) – Real-valued vector, which is the real-valued representation of a complex DFT domain vector. Should be oriented such that the first half of the first axis corresponds to the real part, and the second half corresponds to the imaginary part.

  • even (bool, optional) – If True, the length of the original time-domain signal was even, if False it was odd. This must be supplied to get the correct result. If even, the last element of the real-valued vector corresponds to the Nyquist frequency, which has no imaginary part.

  • scale (bool, optional) – If true, it is scaled such that the inner product of the real vector and the dft vector are equal. According to the definitions in [brunnstromTimedomain2025], where the real DFT is unitary.

  • removed_freqs (int, optional) – The number of frequencies that were removed from the low end of the spectrum. Default option is 0, which corresponds to the full real DFT.

Returns:

dft_vec – Complex DFT domain vector, where dft_vec_len is the number of positive frequency bins that were kept.

Return type:

ndarray of shape (dft_vec_len, …)