aspcol.spatialcovarianceestimation.spatial_cov_weighting

aspcol.spatialcovarianceestimation.spatial_cov_weighting(pos_mic, wave_num, integral_pos_func, integral_volume, num_mc_samples, kernel_func=None, kernel_args=None)

Calculates the weighting matrix used in the interpolated spatial covariance

Corresponds to K in [brunnstromSpatial2025]

Parameters:
  • pos_mic (ndarray of shape (num_mic, 3)) – positions of the microphones

  • wave_num (ndarray of shape (num_freqs)) – the wavenumbers of all considered frequencies, defined as 2 pi f / c, where c is the speed of sound

  • integral_pos_func (function or np.ndarray of shape (num_positions, 3)) – function that generates positions for the integral. Should take an integer as input and return a ndarray of shape (num_positions, 3) alternatively a precomputed array of positions can be provided, in which case num_mc_samples is ignored

  • integral_volume (float) – volume of the integral region

  • num_mc_samples (int) – number of Monte Carlo samples used in the integral approximation

  • kernel_func (function, optional) – kernel function used in the spatial covariance, by default the diffuse kernel

  • kernel_args (list, optional) – additional arguments to the kernel function, by default None

Return type:

spatial_cov