Detecting coeluted impurities by spectral comparison