Closed srvanrell closed 2 years ago
Yes: 0.6.1 is identical to or more accurate than 0.6.0 for any feature.
Thus I'm more confused than before. I'm not getting the same result, see my minimal example below. Should I do it in another way?
import numpy as np
from ssqueezepy import ssq_cwt
x = np.random.random(120)
Tx, *_ = ssq_cwt(x, nv=16, fs=150)
print(x.shape, Tx.shape)
# on ssqueezepy==0.6.0
# (120,) (68, 120)
# on ssqueezepy==0.6.1
# (120,) (114, 120)
Default configs have changed; shapes will match by passing scales
array. 0.6.1
automates scales
more accurately and efficiently - compare
x = ssqueezepy.TestSignals().echirp(N=4096, fmin=1)[0]
Tx, *_ = ssq_cwt(x, ('gmw', {'gamma': 1, 'beta': 1}))
ssqueezepy.visuals.imshow(Tx, abs=1)
Thank you for your prompt response! I saw so many changes on 0.6.1 that I got lost on what to do. Sadly, I cannot continue on this right now, I'll try it later on. thanks!
Hi @OverLordGoldDragon!
Sorry for getting back on this. Would you give me some advice? I have explored the source code and tried several ways of calling ssq_cwt()
on version 0.6.1 but I cannot reproduce the Tx
from calling ssq_cwt(x, nv=16, fs=150)
on 0.6.0. How should I call ssq_cwt
on the 0.6.1 version to get exactly the same result? At least I would like to get the same shape but couldn't do it.
## On 0.6.0
x = ssqueezepy.TestSignals().echirp(N=120, fmin=1)[0]
Tx, *_ = ssq_cwt(x, nv=16, fs=150)
print(x.shape, Tx.shape)
# (120,) (68, 120)
ssqueezepy.visuals.imshow(Tx, abs=1) # Visually I see that I should use flipud on the new version
#----------------------------------------------------------------------
## On 0.6.1 I have tried:
x = ssqueezepy.TestSignals().echirp(N=120, fmin=1)[0]
Tx, *_ = ssq_cwt(x, ('gmw', {'gamma': 1, 'beta': 1}))
print(x.shape, Tx.shape)
# (120,) (114, 120)
x = ssqueezepy.TestSignals().echirp(N=120, fmin=1)[0]
Tx, *_ = ssq_cwt(x, ('gmw', {'gamma': 1, 'beta': 1}), nv=16, fs=150)
print(x.shape, Tx.shape)
# (120,) (145, 120)
x = ssqueezepy.TestSignals().echirp(N=120, fmin=1)[0]
Tx, *_ = ssq_cwt(x, ('gmw', {'gamma': 1, 'beta': 1}), nv=16, fs=150, flipud=False)
print(x.shape, Tx.shape)
# (120,) (145, 120)
Thanks!
shapes will match by passing
scales
array. 0.6.1 automatesscales
[differently]
You haven't passed scales
. If you wish to match Tx
of 0.6.0
, then np.save
its scales
, and pass it to 0.6.1
. The numeric values may not match exactly per few other changes.
Oh, great! Thank you @OverLordGoldDragon !
I have used
ssq_cwt()
to getTx
on 0.6.0 version ofssqueezepy
. I would like to use speed improvents of 0.6.1 and get the sameTx
of 0.6.0 but using 0.6.1 version. Is it possible? How can it be done?Thanks in advance
EDIT: I have reformulated the question