In the Obspy Tutorial there is an example for the use of the cwt function but it uses the mlpy package of Python.
I would like to use the obspy function on tf_misfit, but on the library reference description, the call for the function is different from the description of the parameters.
Does any body has an example for the use of the cwt similar to the one that is described on the tutorial ?

The cwt function in tf_misfit uses the following arguments:

- st: the data array to be processed (either a list or a numpy.ndarray),
- dt: the time difference between two samples in your data array,
- w0: the natural frequency of the wavelet to be used, since only the Morlet wavelet is implemented,
- fmin and fmax: lower and upper limit of the frequency range,
- nf: number of scales (it discretizes the frequency range by this number) (default set to 100),
- wl: the name of the wavelet to be applied (only 'morlet' is implemented).

just to clarify on w0: it has units of frequency and is a control parameter that influences the shape of the wavelet (roughly: how many wiggles within the gaussian window). This way it allows to adjust between time and frequency resolution. For more details on that: the cwt function in tf_misfit actually is a straight implementation of equations (4) and (5) in [1].

The relation between scale and (peak) frequency then is f = w0 / (2 pi a) where a is the scale.

Cheers,
Martin

[1]: Kristekova, M., Kristek, J., Moczo, P., & Day, S. M. (2006). Misfit Criteria for Quantitative Comparison of Seismograms. Bulletin of the Seismological Society of America, 96(5), 1836-1850.