In [3]:
%load_ext autoreload
%autoreload 2
import waipy
import numpy as np


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)

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)

cross_power, coherence, phase_angle = waipy.cross_wavelet(result['wave'], result1['wave'])
waipy.plot_cross('Crosspower sine and cosine', cross_power, phase_angle, z, result, result1)


The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
1024 1024
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/numeric.py:492: ComplexWarning: Casting complex values to real discards the imaginary part
  return array(a, dtype, copy=False, order=order)
1024 1024
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-4d5ebd5f120e> in <module>()
     18 
     19 cross_power, coherence, phase_angle = waipy.cross_wavelet(result['wave'], result1['wave'])
---> 20 waipy.plot_cross('Crosspower sine and cosine', cross_power, phase_angle, z, result, result1)

TypeError: plot_cross() missing 1 required positional argument: 'figname'

In [ ]: