aspcore.fouriertransform.dft.rdft_weighting
- aspcore.fouriertransform.dft.rdft_weighting(dft_vec_len, dft_len, removed_freqs=0)
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 [brunnstromTimedomain2025]
- Parameters:
dft_vec_len (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.
dft_len (int) – The length of the DFT.
removed_freqs (int or 2-tuple of int, optional) – The number of frequencies that were remove from the lower end of the DFT. Default option is 0, which corresponds to the full real DFT. If a 2-tuple is provided, the first element is used for the lower end and the second for the upper end.
- Returns:
c_diag
- Return type:
np.ndarray of shape (num_freqs,)