Giter Site home page Giter Site logo

Error about waipy HOT 6 OPEN

 avatar commented on July 25, 2024
Error

from waipy.

Comments (6)

gavin971 avatar gavin971 commented on July 25, 2024

Traceback (most recent call last):
File "/Users/fuzhp/Downloads/Python_Library/waipy_file/waipy/Waipy Examples /Example 3.py", line 13, in
mother='Morlet',name='x')
File "build/bdist.macosx-10.6-x86_64/egg/waipy/cwt/wavetest.py", line 88, in cwt
File "build/bdist.macosx-10.6-x86_64/egg/waipy/cwt/lib_wavelet.py", line 172, in wavelet
IndexError: axis 1 out of bounds [0, 1)
[Finished in 1.577s]

I did as the suggestion, but it still did't work and got the wrong info! what should I do ?

from waipy.

gavin971 avatar gavin971 commented on July 25, 2024

I modify the "axis=1" with "axis=0" ( lib_wavelet.py and wavetest.py), just get the following warning. Besides, I can run the example(https://wavelet-analysis.readthedocs.io/en/latest/cookbook.html) successfully, and plot the data nino3. (the graph attachment https://www.dropbox.com/s/o861f36bxi67306/figure_1.png?dl=0 )

/Users/fuzhp/anaconda/lib/python2.7/site-packages/waipy-0.0.9.0-py2.7.egg/waipy/cwt/wavetest.py:88: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
/Users/fuzhp/anaconda/lib/python2.7/site-packages/waipy-0.0.9.0-py2.7.egg/waipy/cwt/wavetest.py:89: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future

from waipy.

mabelcalim avatar mabelcalim commented on July 25, 2024

Hi Gavin

Did you try the example1?

open a terminal:

git clone https://github.com/mabelcalim/waipy.git

cd waipy/

sudo python setup.py install

python

import waipy

import numpy as np

import matplotlib.pyplot as pet

import pylab

z = np.linspace(0,2048,2048)

x = np.sin(50_np.pi_z)

y = np.cos(50_np.pi_z)

data_norm = waipy.normalize(x)

result = waipy.cwt(data_norm, 1, 1, 0.125, 2, 4/0.125, 0.72,
6,mother='Morlet',name='x')

waipy.wavelet_plot('Sine', z, data_norm, 0.03125, result)

pylab.show()

data_norm1 = waipy.normalize(y)

result1 = waipy.cwt(data_norm1, 1, 1, 0.125, 2, 4/0.125, 0.72, 6,

... mother='Morlet',name='y')

waipy.wavelet_plot('Cosine', z, data_norm1, 0.03125, result1)

pylab.show()

cross_power, coherence, phase_angle = waipy.cross_wavelet(result['wa
ve'],

...
result1['wave'])

waipy.plot_cross('Crosspower sine and cosine', cross_power, phase_angle,

... z, result, result1)

pylab.show()

I didn't have time to fix all the examples in github.

Please, check if the example n.1 it's working on your machine.

regards
Mabel


Mabel Calim Costa
Instituto Nacional de Pesquisas Espaciais - INPE
Cachoeira Paulista -SP

+55 (12) 3186 - 8566 (ramal 8566)

On 21 October 2016 at 13:12, gavin971 [email protected] wrote:

Traceback (most recent call last):
File "/Users/fuzhp/Downloads/Python_Library/waipy_file/waipy/Waipy
Examples /Example 3.py", line 13, in
mother='Morlet',name='x')
File "build/bdist.macosx-10.6-x86_64/egg/waipy/cwt/wavetest.py", line 88,
in cwt
File "build/bdist.macosx-10.6-x86_64/egg/waipy/cwt/lib_wavelet.py", line
172, in wavelet
IndexError: axis 1 out of bounds [0, 1)
[Finished in 1.577s]

I did as the suggestion, but it still did't work and got the wrong info!
what should I do ?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGNvDXBFpHySNq5bnRqkYfRcUS_l8rYzks5q2NZIgaJpZM4Jdd_Q
.

from waipy.

mabelcalim avatar mabelcalim commented on July 25, 2024

Hi Gavin,

Can you explain better which axis did you modified?
In wavetest.py you do not suppose to change the axis :

global_ws = variance * (np.sum(power.conj().transpose(), axis=0) / n)
this means that the conjugate power is transpose in the first dimension =
axis =0

joint_wavelet = np.concatenate((np.fft.ifft(ondaleta)[np.ceil( n / 2.):],
np.fft.ifft(ondaleta)[np.ceil(n / 2.):][::-1]), axis=1)
this means that I need to concatenate the significant values in the second
dimension = axis =1

Regards
Mabel


Mabel Calim Costa
Instituto Nacional de Pesquisas Espaciais - INPE
Cachoeira Paulista -SP

+55 (12) 3186 - 8566 (ramal 8566)

On 22 October 2016 at 00:15, gavin971 [email protected] wrote:

I modify the axis=1 with axis ( lib_wavelet.py and wavetest.py), just get
the following warning. Besides, I can run the
example(https://wavelet-analysis.readthedocs.io/en/latest/cookbook.html
https://wavelet-analysis.readthedocs.io/en/latest/cookbook.html)
successfully, and plot the data nino3. (the graph attachment
https://www.dropbox.com/s/o861f36bxi67306/figure_1.png?dl=0
https://www.dropbox.com/s/o861f36bxi67306/figure_1.png?dl=0
)

/Users/fuzhp/anaconda/lib/python2.7/site-packages/waipy-
0.0.9.0-py2.7.egg/waipy/cwt/wavetest.py:88: VisibleDeprecationWarning:
using a non-integer number instead of an integer will result in an error in
the future
/Users/fuzhp/anaconda/lib/python2.7/site-packages/waipy-
0.0.9.0-py2.7.egg/waipy/cwt/wavetest.py:89: VisibleDeprecationWarning:
using a non-integer number instead of an integer will result in an error in
the future


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#7 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGNvDXxCX_qBbl0aUGAli3UFKzA4zaZvks5q2XGkgaJpZM4Jdd_Q
.

from waipy.

mabelcalim avatar mabelcalim commented on July 25, 2024

Hi!
Yesterday I converted waipy to python3.6. Now it's waipy0.0.1.0!
Try to check the example_python3.6 on my github (https://github.com/mabelcalim/waipy)

I hardly recommend to install from github:
in your path:
git clone https://github.com/mabelcalim/waipy.git
cd waipy
python3 setup.py install

And try to use the example ;)
If you have some problem to install, please let me know!

Thanks for choosing waipy!
Best regards
Mabel

from waipy.

Kangarooamso avatar Kangarooamso commented on July 25, 2024

Hi,am running this code:
result = waipy.cwt(data_norm, 1, 1, 0.125, 2, 4/0.125, 0.72,
6,mother='Morlet',name='x')
and getting the AxisError below:

AxisError Traceback (most recent call last)
in ()
1 result = waipy.cwt(data_norm, 1, 1, 0.125, 2, 4/0.125, 0.72,
----> 2 6,mother='Morlet')

/home/okama/anaconda2/lib/python2.7/site-packages/waipy/cwt/wavetest.pyc in cwt(data, dt, pad, dj, s0, j1, lag1, param, mother)
73 # Wavelet transform
74 import lib_wavelet
---> 75 ondaleta,wave,period,scale,coi,f = lib_wavelet.wavelet(data,dt,mother,param)#,pad,dj,s0,j1,mother,param)
76 power = np.abs(wave*wave)
77 # Significance levels: (variance=1 for the normalized SST)

/home/okama/anaconda2/lib/python2.7/site-packages/waipy/cwt/lib_wavelet.pyc in wavelet(Y, dt, mother, param)
130 k_neg = [e * (-1) for e in k_neg] # negative part
131 k_neg = k_neg[1:-1] # delete the first value of k_neg = last value of k_pos
--> 132 k = np.concatenate((k_pos,k_neg), axis =1) # vector of symmetric
133 # compute fft of the padded time series
134 f = np.fft.fft(x,n)

AxisError: axis 1 is out of bounds for array of dimension 1

Kindly help to solve it

from waipy.

Related Issues (20)

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.