Beispiel #1
0
 # bootstrap draws
 # if draw number = 0, draws boot0
 draw_n = 1000
 draws = pr.bs_draws(draw_n)
 # bootstrap axial_ll
 fpi = decay_axial(pr, 'pion', draws)
 # bootstrap axial_ls
 fk = decay_axial(pr, 'kaon', draws)
 # process output and plot distribution
 fpi_proc = c51.process_bootstrap(fpi)
 fk_proc = c51.process_bootstrap(fk)
 fpi_boot0, fpi_bs = fpi_proc()
 fk_boot0, fk_bs = fk_proc()
 print fpi_boot0
 if pr.plot_hist_flag == 'on':
     c51.histogram_plot(fpi_bs, 'F0', 'pion F0')
     c51.histogram_plot(fpi_bs, 'E0', 'pion E0')
     c51.histogram_plot(fk_bs, 'F0', 'kaon F0')
     c51.histogram_plot(fk_bs, 'E0', 'kaon F0')
 # plot stability for boot0 fits
 if pr.plot_stab_flag == 'on':
     c51.stability_plot(fpi_boot0, 'F0', 'boot0 fpi')
     c51.stability_plot(fpi_boot0, 'E0', 'boot0 m_pi')
     c51.stability_plot(fk_boot0, 'F0', 'boot0 fk')
     c51.stability_plot(fk_boot0, 'E0', 'boot0 m_k')
 # boot0 result
 F0_pi = fpi_proc.read_boot0('F0')
 E0_pi = fpi_proc.read_boot0('E0')
 F0_k = fk_proc.read_boot0('F0')
 E0_k = fk_proc.read_boot0('E0')
 # calculate decay constant
Beispiel #2
0
        decay_kaon_0, decay_kaon_n = decay_kaon_proc()
        c51.stability_plot(decay_pion_0, 'E0', 'pion E0')
        c51.stability_plot(decay_pion_0, 'Z0_p', 'pion Z0_p')
        c51.stability_plot(decay_kaon_0, 'E0', 'kaon E0')
        c51.stability_plot(decay_pion_0, 'Z0_s', 'pion Z0_s')
        plt.show()
    # calculate boot0 decay constant
    fpi = decay_constant(params, decay_pion_proc.read_boot0('Z0_p'), decay_pion_proc.read_boot0('E0'), mres_pion_proc.read_boot0('mres'))
    fk = decay_constant(params, decay_kaon_proc.read_boot0('Z0_p'), decay_kaon_proc.read_boot0('E0'), mres_pion_proc.read_boot0('mres'), mres_etas_proc.read_boot0('mres'))
    ratio = fk/fpi
    print 'fk/fpi:', ratio
    # calculate bootstrap error
    fpi_bs = decay_constant(params, decay_pion_proc.read_bs('Z0_p','on'), decay_pion_proc.read_bs('E0','on'), mres_pion_proc.read_bs('mres','on'))
    fk_bs = decay_constant(params, decay_kaon_proc.read_bs('Z0_p','on'), decay_kaon_proc.read_bs('E0','on'), mres_pion_proc.read_bs('mres','on'), mres_etas_proc.read_bs('mres','on'))
    plttbl = collections.OrderedDict()
    plttbl['tmin'] = decay_pion_proc.tmin
    plttbl['tmax'] = decay_pion_proc.tmax
    plttbl['fk'] = fk
    plttbl['fk_bserr'] = np.std(fk_bs, axis=0)
    plttbl['fpi'] = fpi
    plttbl['fpi_bserr'] = np.std(fpi_bs, axis=0)
    plttbl['fk/fpi'] = fk/fpi
    plttbl['fk/fpi_bserr(%)'] = np.std(fk_bs/fpi_bs, axis=0)*100
    print tabulate(plttbl, headers='keys')
    if params.plot_hist_flag == 'on':
        fpi_bs = decay_constant(params, decay_pion_proc.read_bs('Z0_p'), decay_pion_proc.read_bs('E0'), mres_pion_proc.read_bs('mres'))
        fk_bs = decay_constant(params, decay_kaon_proc.read_bs('Z0_p'), decay_kaon_proc.read_bs('E0'), mres_pion_proc.read_bs('mres'), mres_etas_proc.read_bs('mres'))
        c51.histogram_plot(fpi_bs, xlabel='fpi')
        c51.histogram_plot(fk_bs, xlabel='fk')
    plt.show()
Beispiel #3
0
 # bootstrap draws
 # if draw number = 0, draws boot0
 draw_n = 1000
 draws = pr.bs_draws(draw_n)
 # bootstrap axial_ll
 fpi = decay_axial(pr, 'pion', draws)
 # bootstrap axial_ls
 fk = decay_axial(pr, 'kaon', draws)
 # process output and plot distribution
 fpi_proc = c51.process_bootstrap(fpi)
 fk_proc = c51.process_bootstrap(fk)
 fpi_boot0, fpi_bs = fpi_proc()
 fk_boot0, fk_bs = fk_proc()
 print fpi_boot0
 if pr.plot_hist_flag == 'on':
     c51.histogram_plot(fpi_bs, 'F0', 'pion F0')
     c51.histogram_plot(fpi_bs, 'E0', 'pion E0')
     c51.histogram_plot(fk_bs, 'F0', 'kaon F0')
     c51.histogram_plot(fk_bs, 'E0', 'kaon F0')
 # plot stability for boot0 fits
 if pr.plot_stab_flag == 'on':
     c51.stability_plot(fpi_boot0, 'F0', 'boot0 fpi')
     c51.stability_plot(fpi_boot0, 'E0', 'boot0 m_pi')
     c51.stability_plot(fk_boot0, 'F0', 'boot0 fk')
     c51.stability_plot(fk_boot0, 'E0', 'boot0 m_k')
 # boot0 result
 F0_pi = fpi_proc.read_boot0('F0') 
 E0_pi = fpi_proc.read_boot0('E0')
 F0_k = fk_proc.read_boot0('F0')
 E0_k = fk_proc.read_boot0('E0')
 # calculate decay constant
Beispiel #4
0
    print 'fk/fpi:', ratio
    # calculate bootstrap error
    fpi_bs = decay_constant(params, decay_pion_proc.read_bs('Z0_p', 'on'),
                            decay_pion_proc.read_bs('E0', 'on'),
                            mres_pion_proc.read_bs('mres', 'on'))
    fk_bs = decay_constant(params, decay_kaon_proc.read_bs('Z0_p', 'on'),
                           decay_kaon_proc.read_bs('E0', 'on'),
                           mres_pion_proc.read_bs('mres', 'on'),
                           mres_etas_proc.read_bs('mres', 'on'))
    plttbl = collections.OrderedDict()
    plttbl['tmin'] = decay_pion_proc.tmin
    plttbl['tmax'] = decay_pion_proc.tmax
    plttbl['fk'] = fk
    plttbl['fk_bserr'] = np.std(fk_bs, axis=0)
    plttbl['fpi'] = fpi
    plttbl['fpi_bserr'] = np.std(fpi_bs, axis=0)
    plttbl['fk/fpi'] = fk / fpi
    plttbl['fk/fpi_bserr(%)'] = np.std(fk_bs / fpi_bs, axis=0) * 100
    print tabulate(plttbl, headers='keys')
    if params.plot_hist_flag == 'on':
        fpi_bs = decay_constant(params, decay_pion_proc.read_bs('Z0_p'),
                                decay_pion_proc.read_bs('E0'),
                                mres_pion_proc.read_bs('mres'))
        fk_bs = decay_constant(params, decay_kaon_proc.read_bs('Z0_p'),
                               decay_kaon_proc.read_bs('E0'),
                               mres_pion_proc.read_bs('mres'),
                               mres_etas_proc.read_bs('mres'))
        c51.histogram_plot(fpi_bs, xlabel='fpi')
        c51.histogram_plot(fk_bs, xlabel='fk')
    plt.show()