<jupyter_start><jupyter_text>Check out PyWavelets<jupyter_code>wv = pywt.ContinuousWavelet("cmor")
trns.shape
scales = np.arange(1,len(f))
ans = pywt.cwt(spectrum, scales, wv)
ans[0].shape
plt.imshow(np.abs(ans[0])**2)
plt.colorbar()
ans[1]
%timeit morlet_transform(spectrum, nu)
%timeit pywt.cwt(spectrum, scales, wv)
import numpy as np
from powerbox.dft import fft
import matplotlib.pyplot as plt
%matplotlib inline
x = np.linspace(-1, 1, 1001)

r2 = np.add.outer(x**2, x**2)

fnc = 1 - r2
fnc[r2 > 1] == 0

bhat, freq = fft(fnc, L = 2, a = 0, b = 2*np.pi)
np.real(bhat).max(), np.imag(bhat).max()
freq
plt.imshow(np.log10(np.real(bhat)))
plt.colorbar()<jupyter_output>/home/steven/miniconda3/envs/wavelets/lib/python3.7/site-packages/ipykernel/__main__.py:1: RuntimeWarning: invalid value encountered in log10
  if __name__ == '__main__':
{'fraction_non_alphanumeric': 0.16765755053507728, 'fraction_numerical': 0.0356718192627824, 'mean_word_length': 5.5271317829457365, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '217288', 'license': 'MIT', 'n_tokens_mistral': 391, 'n_tokens_neox': 370, 'n_words': 72, 'path': 'devel/test_wavelet_transform.ipynb', 'repo_name': 'binnietom/py21cmmc_wv-1', 'size': '841'}