mabelcalim / waipy

This guide includes a Continuous Wavelet Transform (CWT), significance tests from based on Torrence and Compo (1998) and Cross Wavelet Analysis (CWA) based on Maraun and Kurths(2004).
https://wavelet-analysis.readthedocs.org/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
81 stars 49 forks source link

Waipy #6

Open brunofisico opened 8 years ago

brunofisico commented 8 years ago

Hello everyone

I'm having trouble installing the waipy package and running examples can not configure them. what to do?



IndexError Traceback (most recent call last)

in () ----> 1 result = waipy.cwt(data_norm, 1, 1, 0.25, 2, 4/0.25, 0.72, 6, mother='Morlet',name='x') /home/bruno/anaconda2/lib/python2.7/site-packages/waipy-0.0.9.0-py2.7.egg/waipy/cwt/wavetest.pyc in cwt(data, dt, pad, dj, s0, j1, lag1, param, mother, name) 86 # Wavelet transform 87 ondaleta, wave, period, scale, coi, f = lib_wavelet.wavelet( ---> 88 data, dt, param, dj, s0, j1, mother) 89 # wave = np.array(wave) 90 power = (np.abs(wave) *\* 2) /home/bruno/anaconda2/lib/python2.7/site-packages/waipy-0.0.9.0-py2.7.egg/waipy/cwt/lib_wavelet.pyc in wavelet(Y, dt, param, dj, s0, j1, mother) 170 # delete the first value of k_neg = last value of k_pos 171 k_neg = k_neg[1:-1] --> 172 k = np.concatenate((k_pos, k_neg), axis=1) # vector of symmetric 173 # compute fft of the padded time series 174 f = np.fft.fft(x, n) IndexError: axis 1 out of bounds [0, 1)
mabelcalim commented 6 years ago

Hi Bruno

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

iblignic commented 5 years ago

Hi,

I'm having trouble installing the update from Github. I don't know how to follow the readme on the git clone link. I've downloaded the ZIP file using the green "Clone or download" button. What's the next step? (I apologise if my questions are very basic.)

First of all , where should I type in this code? --> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME
--> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

I'm using windows. So if I've unpacked the ZIP file in "my documents" for example, should the first line of the code read as follows?: cd C:\Users\james\Documents

Should the "git clone https://github.com/mabelcalim/waipy.git" line be typed in as a command?

What are the next steps?

If anyone has successfully installed this, I'd really appreciate your help.

Regards,

James

mabelcalim commented 5 years ago

Hi James

Thanks for choosing waipy ! Let's catch up :

--> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

You did git clone my repository, right? So, now you can install it using the following command:

PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ --> sudo python setup.py install

Then you can open a terminal and start use it !

--> python

-->import numpy as np -->from pylab import -->import waipy -->z = np. linspace(0,2048,2048) -->x = np.sin(50np.piz) -->y = np.cos(50np.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)

[image: Captura de Tela 2019-02-13 às 14.51.50.png]

Easy right? Let me know if you have any other questions.

Best regards Mabel

On Wed, 13 Feb 2019 at 11:53, iblignic notifications@github.com wrote:

Hi,

I'm having trouble installing the update from Github. I don't know how to follow the readme on the git clone link. I've downloaded the ZIP file using the green "Clone or download" button. What's the next step? (I apologise if my questions are very basic.)

First of all , where should I type in this code? --> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

I'm using windows. So if I've unpacked the ZIP file in "my documents" for example, should the first line of the code read as follows?: cd C:\Users\james\Documents

Should the "git clone https://github.com/mabelcalim/waipy.git" line be typed in as a command?

What are the next steps?

If anyone has successfully installed this, I'd really appreciate your help.

Regards,

James

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mabelcalim/waipy/issues/6#issuecomment-463206820, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNvDdaU_w_mTZ7CHCR2v9Q4XXn-7ImEks5vNBjKgaJpZM4JY1_Z .

iblignic commented 5 years ago

Hi Mabel,

Thanks for the quick reply.

I got the git clone of your repository... ... I think. If you mean, if I downloaded the Zip file, then yes, I have it. I'm just not sure about how to install it / link it to my version of python so that the waipy functions work.

You mentioned that I need to use the following command:

PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ --> sudo python setup.py install

Where exactly do I input this text? In the anaconda prompt? the spyder console? I have a github account but haven't downloaded the git program yet. Do I need git?

You also mentioned the following text at the beginning of your answer:

--> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

Do I need to enter this first? Do I enter it into the same place as the previously mentioned command?

Once I've done this, can I start using waipy? Or do I need to do something with the final bits of text that you added to the bottom of your answer?

--> python

-->import numpy as np -->from pylab import -->import waipy -->z = np. linspace(0,2048,2048) -->x = np.sin(50np.piz) -->y = np.cos(50np.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)

Once again, apologies if my questions are very basic. I'm not too experienced with python and especially not with adding the different modules to it. I'd really appreciate it if you could walk me through this one.

Thanks a million in advance!

Regards,

James


From: Mabel notifications@github.com Sent: Wednesday 13 February 2019 16:59 To: mabelcalim/waipy Cc: iblignic; Comment Subject: Re: [mabelcalim/waipy] Waipy (#6)

Hi James

Thanks for choosing waipy ! Let's catch up :

--> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

You did git clone my repository, right? So, now you can install it using the following command:

PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ --> sudo python setup.py install

Then you can open a terminal and start use it !

--> python

-->import numpy as np -->from pylab import -->import waipy -->z = np. linspace(0,2048,2048) -->x = np.sin(50np.piz) -->y = np.cos(50np.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)

[image: Captura de Tela 2019-02-13 às 14.51.50.png]

Easy right? Let me know if you have any other questions.

Best regards Mabel

On Wed, 13 Feb 2019 at 11:53, iblignic notifications@github.com wrote:

Hi,

I'm having trouble installing the update from Github. I don't know how to follow the readme on the git clone link. I've downloaded the ZIP file using the green "Clone or download" button. What's the next step? (I apologise if my questions are very basic.)

First of all , where should I type in this code? --> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

I'm using windows. So if I've unpacked the ZIP file in "my documents" for example, should the first line of the code read as follows?: cd C:\Users\james\Documents

Should the "git clone https://github.com/mabelcalim/waipy.git" line be typed in as a command?

What are the next steps?

If anyone has successfully installed this, I'd really appreciate your help.

Regards,

James

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mabelcalim/waipy/issues/6#issuecomment-463206820, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNvDdaU_w_mTZ7CHCR2v9Q4XXn-7ImEks5vNBjKgaJpZM4JY1_Z .

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mabelcalim/waipy/issues/6#issuecomment-463279550, or mute the threadhttps://github.com/notifications/unsubscribe-auth/As06Bb7iNsF1Kq0gSH07GvWL1ZByX72jks5vNERqgaJpZM4JY1_Z.

mabelcalim commented 5 years ago

Hi James,

First of all, open a prompt terminal. Then open the zip file and access the waipy directory: --> /PATH_WHERE_UNZIP_FILE/ --> cd waipy/ so now you are in waipy directory, ok. Now you are here: PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ Now you have to install it. Inside waipy directory has a setup.py file to install waipy so you can use it as a library in python. Write this down in a prompt terminal --> sudo python setup.py install

It's done!

Now you can open a python environment: --> python

and import waipy

--> import waipy.

I hope this helps Mabel

On Thu, 14 Feb 2019 at 09:18, iblignic notifications@github.com wrote:

Hi Mabel,

Thanks for the quick reply.

I got the git clone of your repository... ... I think. If you mean, if I downloaded the Zip file, then yes, I have it. I'm just not sure about how to install it / link it to my version of python so that the waipy functions work.

You mentioned that I need to use the following command:

PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ --> sudo python setup.py install

Where exactly do I input this text? In the anaconda prompt? the spyder console? I have a github account but haven't downloaded the git program yet. Do I need git?

You also mentioned the following text at the beginning of your answer:

--> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

Do I need to enter this first? Do I enter it into the same place as the previously mentioned command?

Once I've done this, can I start using waipy? Or do I need to do something with the final bits of text that you added to the bottom of your answer?

--> python

-->import numpy as np -->from pylab import -->import waipy -->z = np. linspace(0,2048,2048) -->x = np.sin(50np.piz) -->y = np.cos(50np.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)

Once again, apologies if my questions are very basic. I'm not too experienced with python and especially not with adding the different modules to it. I'd really appreciate it if you could walk me through this one.

Thanks a million in advance!

Regards,

James


From: Mabel notifications@github.com Sent: Wednesday 13 February 2019 16:59 To: mabelcalim/waipy Cc: iblignic; Comment Subject: Re: [mabelcalim/waipy] Waipy (#6)

Hi James

Thanks for choosing waipy ! Let's catch up :

--> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

You did git clone my repository, right? So, now you can install it using the following command:

PATH_TO_SAVE_WAIPY_IN_YOUR_HOME/waipy/ --> sudo python setup.py install

Then you can open a terminal and start use it !

--> python

-->import numpy as np -->from pylab import -->import waipy -->z = np. linspace(0,2048,2048) -->x = np.sin(50np.piz) -->y = np.cos(50np.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)

[image: Captura de Tela 2019-02-13 às 14.51.50.png]

Easy right? Let me know if you have any other questions.

Best regards Mabel

On Wed, 13 Feb 2019 at 11:53, iblignic notifications@github.com wrote:

Hi,

I'm having trouble installing the update from Github. I don't know how to follow the readme on the git clone link. I've downloaded the ZIP file using the green "Clone or download" button. What's the next step? (I apologise if my questions are very basic.)

First of all , where should I type in this code? --> cd PATH_TO_SAVE_WAIPY_IN_YOUR_HOME --> git clone https://github.com/mabelcalim/waipy.git --> cd waipy/

I'm using windows. So if I've unpacked the ZIP file in "my documents" for example, should the first line of the code read as follows?: cd C:\Users\james\Documents

Should the "git clone https://github.com/mabelcalim/waipy.git" line be typed in as a command?

What are the next steps?

If anyone has successfully installed this, I'd really appreciate your help.

Regards,

James

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mabelcalim/waipy/issues/6#issuecomment-463206820, or mute the thread < https://github.com/notifications/unsubscribe-auth/AGNvDdaU_w_mTZ7CHCR2v9Q4XXn-7ImEks5vNBjKgaJpZM4JY1_Z

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/mabelcalim/waipy/issues/6#issuecomment-463279550>, or mute the thread< https://github.com/notifications/unsubscribe-auth/As06Bb7iNsF1Kq0gSH07GvWL1ZByX72jks5vNERqgaJpZM4JY1_Z

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mabelcalim/waipy/issues/6#issuecomment-463590573, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNvDQgCKLYI7ivf_GyCcuIELpf1tCaiks5vNUXvgaJpZM4JY1_Z .

iblignic commented 5 years ago

Hi Mabel,

Thanks again for your answer.

I followed your steps and I think that I now have waipy installed. I changed the directory to where I have your unpacked zip files saved and entered "setup.py install" to the command prompt. The terminal wrote some lines and in the end printed "Finished processing dependencies for waipy==0.0.1.40" ... so I think it worked.

When I try to use waipy however, I get the following error message "TabError: inconsistent use of tabs and spaces in indentation"

Is this an error in the waipy code or did I just not install it properly?

Thanks again for your help!