ntest_output[0:data.shape[0]/ntest, j] = data[range(j, data.shape[0], ntest), 9]
        hlr_output[0:data.shape[0]/ntest, j] = data[range(j, data.shape[0], ntest), 10]
        g1_output[0:data.shape[0]/ntest, j] = data[range(j, data.shape[0], ntest), 11]
        g2_output[0:data.shape[0]/ntest, j] = data[range(j, data.shape[0], ntest), 12]

    # First do the plots of g1
    YMAX_ZOOMIN = 1e-4
    XMIN = -.6
    XMAX = .5
    plt.clf()
    plt.axhline(ls='--', color='k')
    plt.axvline(ls='--', color='k')
    plt.xlim(XMIN, XMAX)
    for i in range(ntest)[:-1]:
        # First fit a line to the points
        c, m, var_c, cov_cm, var_m = fitting.fitline(
            g1obs_draw[0:data.shape[0]/ntest, i], delta_g1obs[0:data.shape[0]/ntest, i])
        if i < 7:
            fmt='x'
        else:
            fmt='o'
        plt.errorbar(
            g1obs_draw[0:data.shape[0]/ntest, i], delta_g1obs[0:data.shape[0]/ntest, i],
            yerr=err_g1obs[0:data.shape[0]/ntest, i], fmt=fmt,
            label=r"n = %.1f, m = %.2e $\pm$ %.2e" % (
                test_sersic_highn_basic.SERSIC_N_TEST[i], m, np.sqrt(var_m)))
    plt.xlabel(r'g$_1$ (DFT)')
    plt.ylabel(r'$\Delta$g$_1$ (DFT - Photon)')
    plt.ylim(-YMAX_ZOOMIN, YMAX_ZOOMIN)
    plt.legend()
    #plt.title(test_case)
    plt.subplots_adjust(left=0.15)
Beispiel #2
0
                  j] = data[range(j, data.shape[0], ntest), 11]
        g2_output[0:data.shape[0] / ntest,
                  j] = data[range(j, data.shape[0], ntest), 12]

    # First do the plots of g1
    YMAX_ZOOMIN = 1e-4
    XMIN = -.6
    XMAX = .5
    plt.clf()
    plt.axhline(ls='--', color='k')
    plt.axvline(ls='--', color='k')
    plt.xlim(XMIN, XMAX)
    for i in range(ntest)[:-1]:
        # First fit a line to the points
        c, m, var_c, cov_cm, var_m = fitting.fitline(
            g1obs_draw[0:data.shape[0] / ntest, i],
            delta_g1obs[0:data.shape[0] / ntest, i])
        if i < 7:
            fmt = 'x'
        else:
            fmt = 'o'
        plt.errorbar(
            g1obs_draw[0:data.shape[0] / ntest, i],
            delta_g1obs[0:data.shape[0] / ntest, i],
            yerr=err_g1obs[0:data.shape[0] / ntest, i],
            fmt=fmt,
            label=r"n = %.1f, m = %.2e $\pm$ %.2e" %
            (test_sersic_highn_basic.SERSIC_N_TEST[i], m, np.sqrt(var_m)))
    plt.xlabel(r'g$_1$ (DFT)')
    plt.ylabel(r'$\Delta$g$_1$ (DFT - Photon)')
    plt.ylim(-YMAX_ZOOMIN, YMAX_ZOOMIN)