aspcol.kernelinterpolation_jax.time_domain_diffuse_kernel
- aspcol.kernelinterpolation_jax.time_domain_diffuse_kernel(pos1, pos2, wave_num, real_nyquist=False)
Time domain diffuse sound field kernel.
Assumes the total DFT length was even. Any number of real frequencies / wave numbers can represent both an odd and even number of frequencies.
Defined for each position pair as F^{-1} Gamma(r, r’) F, where Gamma(r, r’) is the multifrequency kernel, and F and F^{-1} are the real DFT and inverse DFT transforms.
- Parameters:
pos1 (np.ndarray of shape (num_points1, 3)) – Position of the first point.
pos2 (np.ndarray of shape (num_points2, 3)) – Position of the second point.
wave_num (np.ndarray of shape (num_real_freqs,)) – Wave number, defined as 2*pi*f/c, where f is the frequency and c is the speed of sound.
real_nyquist (bool, optional) – If True, the kernel is calculated as 1/2 * k(r, r’) + k(r, -r’) for the highest frequency bin. This is the kernel derived in [brunnströmTime2025] for even DFT lengths. It should be set to False for odd DFT lengths, but it is also not likely to make a big difference, as the sound field model for the Nyquist frequency is non-physical anyway. Default is False.
- Returns:
The time domain kernel matrix. The dft_len is assumed to be even, and the number of real frequencies is dft_len//2 + 1.
- Return type:
np.ndarray of shape (num_points1, num_points2, dft_len, dft_len)
Notes
This function can be substantially optimized by implementing in terms of only the real frequencies and the FFT rather than DFT matrices. This is left for future work, whereas this is clear and easy to check for correctness.