Skip to content

Added freq and time downsampling support.

Latest
Compare
Choose a tag to compare
@xli2522 xli2522 released this 26 Dec 00:40
· 20 commits to main since this release

Changed function def sTransform(ts, sample_rate, frange=[0, 500], frate = 1, downsample='none', onesided=True, elevated=True, elevation=10e-8):

  1. Added argument: downsample (str, int, optional) down-sampled length in time ['none', length(int)]
  • downsample = 'none': generated result table ('spectrogram' if taken the abs) has the same number of time elements as the input data
  • downsample= int value: generated result table ('spectrogram' if taken the abs) has int value number of time elements. int value is expected to hold values between the original data length (upper bound) and two times the number of frequency elements allowed by frange (number frequency elements = frange*length/sample_rate; lower bound). If a given int value exceeds the lower bound, sTransform downsamples to the lowest possible length allowed by the Nyquist frequency limit.
  1. Changed definition: frate (int, optional) frequency sampling rate
  • the definition of frate was changed from frequency bin number or number frequency to frequency in Hz.
  • ie: frate = n gives frequency axis in n Hz increment.