added function to calc freqvec from tvec