You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to plot the actual frequencies or actual periods on my scaleograms. I'm using code based on the advanced Python examples so that I can use the optimization. But fcwt returns scales as a SWIG object and I'm not sure what to do with that. (<fcwt.fcwt.Scales; proxy of <Swig Object of type 'Scales *' at 0x000002154D2B70F0> >) Is there a way get to some approximation of the actual periods or frequencies used?
Also what does the normalization option do? Normalized to what?
The text was updated successfully, but these errors were encountered:
There is the function getFrequencies you can call on the scales object.
fs = 1000
f0 = 0.1 #lowest frequency
f1 = 5 #highest frequency
fn = 300 #number of frequencies
#initialize Morlet wavelet with wavelet parameter (sigma) 2.0
morl = fcwt.Morlet(2.0)
#initialize scales
scales = fcwt.Scales(morl, fcwt.FCWT_LINFREQS, fs, f0, f1, fn)
#initialize output array
freqs = np.zeros((fn,), dtype=np.float32)
# get frequencies from swig scale object
scales.getFrequencies(freqs)
Just watch out, it seems that the frequencies coming out of that call are in decreasing order. Here the first is around 5 (f1) and the last one is 0.1 (f0).
I'd like to be able to plot the actual frequencies or actual periods on my scaleograms. I'm using code based on the advanced Python examples so that I can use the optimization. But fcwt returns scales as a SWIG object and I'm not sure what to do with that. (<fcwt.fcwt.Scales; proxy of <Swig Object of type 'Scales *' at 0x000002154D2B70F0> >) Is there a way get to some approximation of the actual periods or frequencies used?
Also what does the normalization option do? Normalized to what?
The text was updated successfully, but these errors were encountered: