Perturbation of Matrices Diagonalizable under Congruence

A matrix $A\in M_{n}(\mathbb{C})$ is called unitoid if it is congruent to a diagonal matrix. Necessary and sufficient conditions are given on the canonical angles of a unitoid matrix so that sufficiently small perturbations remain unitoid. This, in particular, resolves the question of when simultaneous diagonalizability of two Hermitian matrices is retained under perturbation.