Title: Estimating the rank of the spectral density matrix