Found the bug in the modal decomposition—the issue is with the normalization function. It needs a matrix_vector loop applied to it.