NCAR / geocat-comp

GeoCAT-comp provides implementations of computational functions for operating on geosciences data. Many of these functions originated in NCL and were translated into Python.
https://geocat-comp.readthedocs.io
Apache License 2.0
123 stars 56 forks source link

📖 NCL Wavelet functionality #486

Open anissa111 opened 12 months ago

anissa111 commented 12 months ago

Research existing NCL wavelet functionality, investigate existing python solutions, and make initial recommendations about reimplementation, wrapping, or writing equivalent workflow demonstration material

Relevant material:

cyschneck commented 12 months ago

Recommended guide for wavelet analysis: A Practical Guide to Wavelet Analysis by Christopher Torrence and Gilbert P. Compo (1998)

Additional resources:

cyschneck commented 10 months ago

NCL Function: wavelet

Calculates the wavelet transform of a time series and significance levels

Inputs:

Returns: Three-dimensional array (wave) dimensioned 2 by jtot by N

Wave attributes:

Possible Python implementation: PyWavlets

cyschneck commented 10 months ago

Pywavlet Relevant Wavelet families:

Additional Wavelet Types:

cyschneck commented 10 months ago

wavelets and pycwt are both more direct Python implementation of wavelets from Torrence and Compo that includes wavelets for Morlet, Paul, DOG (as well as Ricker, Marr, Mexican Hat)

While both are popular repositories with what appears to be clean implementation, both have either few or no releases, so would need to be re implemented to be compatible with Python 3.9-3.12+

cyschneck commented 9 months ago

pycwt appears to be the strongest replacement. Module based on C. Torrence and G. P. Compo paper

pycwt.cwt(signal, dt, dj=0.08333333333333333, s0=-1, J=-1, wavelet=u'morlet', freqs=None): Continuous wavelet transform of the signal at specified scales.

Input:

Returns:

cyschneck commented 6 months ago

Functionality includes: