def problem_3():
    f = sy.symbols('f')
    psi_hat = wv.battle_lemarie_wavelet_transform()
    psi_hat_lambda = sy.lambdify(f, psi_hat, 'numpy')

    freq = np.linspace(-2, 2, 100)
    freq[0] = np.finfo(float).eps
    psi_hat_signal = np.array(np.abs([psi_hat_lambda(v) for v in freq]))

    plt.figure()
    plt.title('Fourier Transform of Mother Wavelet')
    plt.plot(freq, psi_hat_signal)
    plt.show()
def problem_4():
    # Convert scaling function to time domain
    phi_hat = wv.battle_lemarie_scaling_transform()
    Xs, ts = f_trans(phi_hat, 8.1, 128, 0)

    # Plot scaling function
    plt.figure()
    plt.subplot(1, 2, 1)
    plt.title('Scaling Function')
    plt.plot(ts, Xs)

    # Convert wavelet to time domain
    psi_hat = wv.battle_lemarie_wavelet_transform()
    Xs, ts = f_trans(psi_hat, 8.1, 128, 0)

    # Plot wavelet
    plt.subplot(1, 2, 2)
    plt.title('Mother Wavelet')
    plt.plot(ts, Xs)
    plt.show()