aspcore.fouriertransform.dft.dft_domain_to_real_vec

aspcore.fouriertransform.dft.dft_domain_to_real_vec(vec, even=True, scale=True, num_freqs_removed_low=0)

Isomorphism between a complex DFT domain vector and a real-valued 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 (num_real_freqs, ...)) – DFT domain vector

  • even (bool, optional) – If True, the DFT length is even, if False it is odd. This must be supplied as it is not possible to infer from the shape of vec.

  • 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.

  • num_freqs_removed_low (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:

real_vec – Real-valued vector with real and imaginary parts interleaved

Return type:

ndarray of shape (num_freqs, …)