Imaginary eigenvalues of Zakharov–Shabat problems with non-zero background