def plot_tsvd_plot(matrix_size):
    geophysics = GeoPhysicsBase(matrix_size, 0.25)
    svdregularization = SVDRegularization(geophysics.A, geophysics.g)
    s, utb, utbs = svdregularization.get_picatd_parameter()
    x = np.arange(matrix_size)
    plt.plot(x, geophysics.fexact, "r", linewidth=2, label="pre defined f")
    plt.plot(x, svdregularization.reconstruct_with_tikhonov(1e-12), "bs", linewidth=2, label="reconstructed f")
    plt.tick_params(axis="both", which="major", labelsize=18)
    plt.legend(loc="upper right", shadow=True, fontsize="18")
    plt.show()
def plot_tsvd_plot(matrix_size):
    geophysics = GeoPhysicsBase(matrix_size, 0.25)
    svdregularization = SVDRegularization(geophysics.A, geophysics.g)
    s, utb, utbs = svdregularization.get_picatd_parameter()
    x = np.arange(matrix_size)
    plt.plot(x, geophysics.fexact, 'r', linewidth=2, label='pre defined f')
    plt.plot(x, svdregularization.reconstruct_with_tsvd(48), 'bs', linewidth=2, label='reconstructed f')
    plt.tick_params(axis='both', which='major', labelsize=18)
    plt.legend(loc='upper right', shadow=True, fontsize='18')
    plt.show()
def plot_picard_plot(matrix_size):
    geophysics = GeoPhysicsBase(matrix_size, 0.25)
    noise = np.random.normal(0,1E-4, matrix_size)
    for i in range(3, matrix_size):
        noise[i] = 0
    g = geophysics.g + noise
    svdregularization = SVDRegularization(geophysics.A, g)
    s, utb, utbs = svdregularization.get_picatd_parameter()
    x = np.arange(matrix_size)
    plt.plot(x, s, 'r*', linewidth=2, label='${\sigma _i}$')
    plt.plot(x, abs(utb), 'bs', linewidth=2, label='$|u_i^Tb|$')
    plt.plot(x, abs(utbs), 'g^', linewidth=2, label='$|u_i^Tb|/{\sigma _i}$')
    plt.tick_params(axis='both', which='major', labelsize=18)
    plt.legend(loc='lower left', shadow=True, fontsize='18')
    plt.yscale("log")
    plt.show()