aspcore.fouriertransform.dft.irdft_mat

aspcore.fouriertransform.dft.irdft_mat(dft_len: int, num_freqs_removed_low=0)

DFT matrix corresponding to the inverse real DFT.

The inverse real DFT is defined as Re[B @ a], where B is the dft_len x num_freqs matrix returned by this function. Therefore, a matrix multiplication is not sufficient to equal irfft(a), but the real part of the result of the matrix multiplication is.

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

  • num_freqs_removed_low (int) – Number of frequencies to remove.

Returns:

F – DFT matrix with the first num_to_remove frequencies removed.

Return type:

np.ndarray of shape (L/2 + 1 - num_freqs_removed_low, L)

Notes

The matrix represents the forward transform such that F @ a = rfft(a). Note that the matrix is not square, so the inverse transform is not the hermitian transpose of the forward transform.