aspcol.distance.spatial_similarity
- aspcol.distance.spatial_similarity(vec1, vec2)
Measures the spatial similarity between two vectors. Also known as the modal assurance criterion (MAC).
1 is identical, 0 is fully dissimilar
Implements |p^H q|^2 / (||p||^2 ||q||^2)
- Parameters:
vec1 (np.ndarray of shape (..., N)) – First vector
vec2 (np.ndarray of shape (..., N)) – Second vector
- Returns:
sim – The spatial similarity between the two vectors
- Return type:
float or ndarray of shape (…)
References
in M. Hahmann and E. Fernandez-Grande, “A convolutional plane wave model for sound field reconstruction.” Aug. 24, 2022.