Skip to content

Releases: xli2522/S-Transform

Added freq and time downsampling support.

26 Dec 00:40
Compare
Choose a tag to compare

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.

Added the inverse S transform

07 Nov 22:12
Compare
Choose a tag to compare

This version introduces a new function inverseS - the inverse S transform from S transform results.

  • Previously, the inverse of S is calculated by recoverS - reversing the window effect on the zero frequency row of the S transform output. The recoverS method has limited applications and requires a so-called elevated Gaussian window (so the reverse application of the window does not introduce 0 division error).

  • The new inverseS does not require an elevated Gaussian window and does the inverse transform by recovering each frequency component at a time.

(Skipped version 0.0.1 to match TFchirp pypi package)