OverLordGoldDragon / ssqueezepy

Synchrosqueezing, wavelet transforms, and time-frequency analysis in Python
MIT License
599 stars 92 forks source link

Why have steps when using ssqueezepy to calculate instantaneous frequency? #63

Closed wsf1990 closed 2 years ago

wsf1990 commented 2 years ago
  1. I'm using ssqueezepy to calculate signal's instantaneous frequency, The method like below:

    Tx, Wx, ssq_freqs, scales, *_ = ssq_cwt(data, ('gmw', {'beta': 2, 'gamma': 3}), order=0, padtype='wrap', fs=fs)
    ridge_idxs = extract_ridges(Tx, scales, penalty=0.5)
    frequencies = ssq_freqs[::-1][ridge_idxs[:, 0]]  # this is the result
  2. The result like below: image

  3. I think this method can get the correct result, but the result have some steps which not smooth.So what cause this?Which parameters should change?

Thanks!

OverLordGoldDragon commented 2 years ago

I'll handle on SE.