aspcore.fouriertransform.dft.rdft_weighting

aspcore.fouriertransform.dft.rdft_weighting(num_freqs, dft_len, freqs_to_remove_low)

The weighting required for the real DFT to be the same as the complex DFT.

np.diag(c_diag) corresponds to C in the paper

Parameters:
  • dft_len (int) – The length of the DFT.

  • num_freqs (int) – The number of frequencies in the resulting real-valued DFT. Technically redundant information as this is the same as dft_len // 2 + 1 - freqs_to_remove, so will not be necessary later.

  • freqs_to_remove_low (int) – The number of frequencies that were remove from the lower end of the DFT.

Returns:

c_diag

Return type:

np.ndarray of shape (num_freqs,)