Closed scottfleming closed 2 years ago
Good point. Indeed the conversion will be simple via a two-way center_frequency
method. I'll add this to the todo list but I don't intend to work on this repository anytime soon. For now I recommend something like:
This assumes freqs
is logspaced, which can be adjusted for linear spacing, and it is approximate.
Guaranteed to work, but only kind='peak'
supported ( though not tested exhaustively)
wavelet, fs: gmw, 400
scales: [ 1 100 1000]
freqs: [172.8515625 1.7578125 0.1953125]
Might work for any kind
wavelet, fs: gmw, 400
scales: [ 1 100 1000]
freqs: [172.8515625 1.7578125 0.1953125]
Just question, I'm plotting y-axis with my function below, is that conversion correct?
@fairlight-kr Please open a separate issue. And code should be standalone (I don't have your data.txt
, use randn
). But no, freq != 1 / scale
- see article.
My understanding is that the ssq_cwt function optionally accepts a set of wavelet scales rather than corresponding frequencies. While I understand that there are a few different interpretations of "corresponding frequencies" for wavelet scales, I've noted that there is a simple, analytical relationship (see Equation A3 of "An Introduction to Wavelet Analysis in Oceanography and Meteorology", also referenced in "A Practical Guide to Wavelet Analysis") between wavelet scale and frequency for certain wavelet functions. Would it be difficult to add functionality for the user to pass in frequences rather than wavelet scales and have those converted to wavelet scales on the backend?