trackfreq function

function to find the frequencies of a spectral object