GithubHelp home page GithubHelp logo

ct6502 / wavelets Goto Github PK

View Code? Open in Web Editor NEW
251.0 251.0 153.0 3.04 MB

Torrence & Compo Wavelet Analysis Software

License: MIT License

HTML 22.32% Fortran 44.45% Prolog 16.26% MATLAB 6.93% Python 7.83% Shell 0.03% C 2.19%

wavelets's People

Contributors

ct6502 avatar khider avatar mvonpapen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wavelets's Issues

add topics

I suggest adding the topics wavelet, wavelets in the About section.

bug: uneven number of samples in wave_python

Dear Chris,

I think I may have stumbled over a minor bug in the python
function waveletFunctions.py: If you run the code on a time series of uneven
length (e.g. len(x)=101), it returns "ValueError: operands could not be
broadcast together with shapes (101,) (100,)
" as the Fourier transform f
and the daughter have different sizes. You may check this via

import numpy as np
from waveletFunctions import wavelet

x = np.random.randn(101)
dt = 1.0
w = wavelet ( x, dt )

The problem is in the construction of the wave vector k. Here, the last
entry of the kplus vector is always omitted (kplus[0:-1]). However, in
case of uneven length of the time series, the Fourier transform returns
no value for the Nyquist frequency and therefore the last entry of wave
vector kplus should be used as well. I found that the following lines
replacing lines 115-119 solve this problem:

#....construct wavenumber array used in transform [Eqn(5)]
kplus = np.arange(1, n/2+1)
kplus = (kplus * 2 * np.pi / (n * dt))
kminus = (-(kplus[0:(n-1)/2])[::-1])
k = np.concatenate(([0.], kplus, kminus))

Here, I simply replaced kplus[0:-1] by kplus[0:(n-1)/2]. The np.fix
function is actually not needed as dividing by integer automatically
takes care of rounding down.

Best regards,
Mitch

About the time granularity

Hello, thank you very much for your contribution to enable me to use Python for wavelet analysis. I have a question that I would like to ask, and I wonder if you are comfortable answering it.
In your example data, the time granularity is seasonal, i.e. 0.25 years, and it is continuous full year data. Now I have a time series with a daily granularity, but only observations are available from 1 February to 30 November each year. There are two ways I can think of to do wavelet analysis on such data.

  1. fill all the days of the year for which there is no data with zeros, and then perform a wavelet analysis.
  2. Define the number of days in the year and define the period for which data is actually available as a year, i.e. 303 days. Afterwards perform a wavelet analysis and apply the definition of a year to all cycles of the analysis.
    My personal preference is to use the second approach, but is this theoretically feasible?

about compatibility for gfortran

Dear Developers,

Thank you for your code! I have been using it for chemistry applications, it was great!
I have been using your code by customizing it for my purpose in the past using the fortran release. Since now g77 compiler has been discontinued, I would like to use gfortran to compile it. I think there might be issues with the cfftpack.f and chisqr.f libraries.
Is there any updated version that can be compiled with gfortran or some suggestion to compile the code with new compilers?

Thank you very much in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.