• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python toolbox.latest_data函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中measurement.lib.tools.toolbox.latest_data函数的典型用法代码示例。如果您正苦于以下问题:Python latest_data函数的具体用法?Python latest_data怎么用?Python latest_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了latest_data函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: stage_3_calibrations

def stage_3_calibrations():
    fig, ax = plt.subplots(1,1, figsize = (5,4))
    folder = toolbox.latest_data('calibrate_LDE_spin_echo') 
    print 80*'='
    print 'LDE-DD spin echo time'
    print 80*'='
    DD_spin_echo_time = DD_spin_echo(folder, ax)
    fig.savefig(os.path.join(folder, 'stage_3_calibrations.png'))
开发者ID:machielblok,项目名称:analysis,代码行数:8,代码来源:DD_calibrations.py


示例2: stage_4_calibrations

def stage_4_calibrations():
    fig, ax = plt.subplots(1,1, figsize = (5,4))
    folder = toolbox.latest_data('t_between_pulses') 
    print 80*'='
    print 'time between pi pulses'
    print 80*'='
    t_between_pi_pulses = t_between_pi(folder, ax)
    fig.savefig(os.path.join(folder, 'stage_4_calibrations.png')) 
开发者ID:machielblok,项目名称:analysis,代码行数:8,代码来源:DD_calibrations.py


示例3: stage_0p5_calibrations

def stage_0p5_calibrations():
    # ssro first
    fig, (ax1, ax2) = plt.subplots(1,2, figsize=(10,4))

    print 80*'='
    print 'Dark ESR'
    print 80*'='
    f0,u_f0 = dark_esr_analysis.analyze_dark_esr(
        toolbox.latest_data('DarkESR'), ax=ax1, ret='f0',
        print_info=False)
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:10,代码来源:DD_calibrations.py


示例4: N_frq

def N_frq(ax=None):
    folder = toolbox.latest_data("NMR_frq_scan")
    if ax == None:
        fig, ax = plt.subplots(1, 1)
    fit_result = fit_population_vs_detuning(folder, ax, 7.135)

    x0 = fit_result["params_dict"]["x0"]
    u_x0 = fit_result["error_dict"]["x0"]
    ax.text(7.1, 0.3, "$N_{frq}$ = (%.3f +/- %.3f) MHz" % (x0, u_x0), va="bottom", ha="left")

    return (f * 1e3, u_f * 1e3)
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:11,代码来源:BSM_calibrations.py


示例5: fast_rabi

def fast_rabi(ax=None):
    folder = toolbox.latest_data("cal_fast_rabi" + name)
    if ax == None:
        fig, ax = plt.subplots(1, 1)
    fit_result = calibrate_epulse_rabi(folder, ax, 1.0 / 125, 0.5, fit_k=False)

    f = fit_result["params_dict"]["f"]
    u_f = fit_result["error_dict"]["f"]
    ax.text(100, 0.9, "$f_r$ = (%.3f +/- %.3f) MHz" % (f * 1e3, u_f * 1e3), va="bottom", ha="left")

    return (f * 1e3, u_f * 1e3)
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:11,代码来源:BSM_calibrations.py


示例6: dd_calibrate_fidelity

def dd_calibrate_fidelity(r, ax=None):
    folder = toolbox.latest_data('DynamicalDecoupling')

    if ax==None:
        fig,ax = plt.subplots(1,1)
           
    fit_result = calibrate_epulse_amplitude(folder, ax, r*108,  1, 0 )
    A = fit_result['params_dict']['of']
    u_A = fit_result['error_dict']['of']
    ax.text(r*108, 0.5, 'F = (%.3f +/- %.3f)' % (A, u_A))

    return A, u_A 
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例7: dd_delta_t

def dd_delta_t(ax=None):
    folder = toolbox.latest_data('DynamicalDecoupling')

    if ax==None:
        fig,ax = plt.subplots(1,1)
           
    fit_result = calibrate_epulse_amplitude(folder, ax, -0.24,  1, 0 )
    A = fit_result['params_dict']['x0']
    u_A = fit_result['error_dict']['x0']
    ax.text(-0.24, 0.5, 'dt = (%.3f +/- %.3f) ns' % (A, u_A))

    return A, u_A 
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例8: CORPSE_pi2_fidelity

def CORPSE_pi2_fidelity(ax=None):
    folder = toolbox.latest_data('CORPSEPi2Calibration') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = epulse_fidelity(folder, ax, 0.5)
    fid = fit_result['params_dict']['of']
    u_fid = fit_result['error_dict']['of']
    ax.text(0.6, 0.2, 'of = (%.3f +/- %.3f)' % (fid, u_fid))

    return fid, u_fid 
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例9: CORPSE_fidelity

def CORPSE_fidelity(ax=None):
    folder = toolbox.latest_data() 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = epulse_fidelity(folder, ax, 1)
    fid = fit_result['params_dict']['of']
    u_fid = fit_result['error_dict']['of']
    ax.text(429, 0.5, 'of = (%.3f +/- %.3f)' % (fid, u_fid))

    return fid, u_fid 
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例10: CORPSE_pi2_alt

def CORPSE_pi2_alt(sil,M,ax=None):
    folder = toolbox.latest_data('CORPSEPi2Calibration_sil'+str(sil)+str(M)) 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = calibrate_epulse_amplitude(folder, ax, 0.46,  0, 0 )
    A = fit_result['params_dict']['x0']
    u_A = fit_result['error_dict']['x0']
    ax.text(0.42, 0.5, 'A = (%.3f +/- %.3f) V' % (A, u_A))

    return A, u_A 
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例11: calibrate_xy4_fet

def calibrate_xy4_fet(ax=None):
    folder = toolbox.latest_data('bare_xy4') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = calibrate_epulse_amplitude(folder, ax, 107,  0, 0 )
    revival = fit_result['params_dict']['x0']
    u_revival = fit_result['error_dict']['x0']
    ax.text(revival, 0.5, 'tfet = (%.3f +/- %.3f)' % (revival, u_revival))

    return revival, u_revival
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例12: C13_rev

def C13_rev(ax=None):
    folder = toolbox.latest_data('calibrate_first_revival') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = fit_gaussian(folder, ax, 110)
    revival = fit_result['params_dict']['x0']
    u_revival = fit_result['error_dict']['x0']
    ax.text(revival-20, 0.3, 'tfet = (%.3f +/- %.3f)' % (revival, u_revival))

    return revival, u_revival
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:DD_calibrations.py


示例13: t_between_pi

def t_between_pi(ax=None):
    folder = toolbox.latest_data('t_between_pulses') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = calibrate_epulse_amplitude(folder, ax, 0.02,  1, 0 )
    revival = fit_result['params_dict']['x0']
    u_revival = fit_result['error_dict']['x0']
    ax.text(revival, 0.3, 'tbetweenpi = (%.3f +/- %.3f)' % (revival, u_revival))

    return revival, u_revival
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:12,代码来源:DD_calibrations.py


示例14: DD_spin_echo

def DD_spin_echo(ax=None):
    folder = toolbox.latest_data('calibrate_LDE_spin_echo') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = calibrate_epulse_amplitude(folder, ax, -.1,  1, 0 )
    A = fit_result['params_dict']['x0']
    u_A = fit_result['error_dict']['x0']
    ax.text(0., 0.5, 'dt = (%.3f +/- %.3f) us' % (A, u_A))

    return A, u_A 
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:12,代码来源:DD_calibrations.py


示例15: C13_rev_small_range

def C13_rev_small_range(ax=None):
    folder = toolbox.latest_data('calibrate_first_revival') 
    
    if ax==None:
        fig,ax = plt.subplots(1,1)
        
    fit_result = calibrate_epulse_amplitude(folder, ax, 110,  1, 0 )
    revival = fit_result['params_dict']['x0']
    u_revival = fit_result['error_dict']['x0']
    ax.text(revival-20, 0.3, 'tfet = (%.3f +/- %.3f)' % (revival, u_revival))

    return revival, u_revival
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:12,代码来源:DD_calibrations.py


示例16: pi_pi2pi_mI0

def pi_pi2pi_mI0(ax=None):
    folder = toolbox.latest_data("cal_pi2pi_pi_mI0")

    if ax == None:
        fig, ax = plt.subplots(1, 1)

    fit_result = calibrate_epulse_amplitude(folder, ax, 0.11, 1, 0)
    A = fit_result["params_dict"]["x0"]
    u_A = fit_result["error_dict"]["x0"]
    ax.text(0.1, 0.5, "A = (%.3f +/- %.3f) V" % (A, u_A))

    return A, u_A
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:12,代码来源:BSM_calibrations.py


示例17: fast_rabi

def fast_rabi(ax=None):
    folder = toolbox.latest_data('cal_fast_rabi'+name)
    if ax==None:
        fig,ax = plt.subplots(1,1)
    fit_result = calibrate_epulse_rabi(folder, ax, 1./125, 0.5, fit_k=False)

    f = fit_result['params_dict']['f']
    u_f = fit_result['error_dict']['f']
    ax.text(100, 0.9, '$f_r$ = (%.3f +/- %.3f) MHz' % (f*1e3, u_f*1e3),
        va='bottom', ha='left')

    return (f*1e3, u_f*1e3)
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:BSM_calibrations.py


示例18: N_frq

def N_frq(ax=None):
    folder = toolbox.latest_data('NMR_frq_scan')
    if ax==None:
        fig,ax = plt.subplots(1,1)
    fit_result = fit_population_vs_detuning(folder, ax, 7.135)

    x0 = fit_result['params_dict']['x0']
    u_x0 = fit_result['error_dict']['x0']
    ax.text(7.1, 0.3, '$N_{frq}$ = (%.3f +/- %.3f) MHz' % (x0, u_x0),
        va='bottom', ha='left')

    return (f*1e3, u_f*1e3)
开发者ID:machielblok,项目名称:analysis,代码行数:12,代码来源:BSM_calibrations.py


示例19: slow_pi

def slow_pi(ax=None):
    folder = toolbox.latest_data("cal_slow_pi_" + name)
    if ax == None:
        fig, ax = plt.subplots(1, 1)
    fit_result = calibrate_epulse_rabi(folder, ax, 0.015, 1.0, 0.0, fit_x0=False, fit_k=False)

    f = fit_result["params_dict"]["f"]
    u_f = fit_result["error_dict"]["f"]
    # ax.text(500, 0.4, 'pi = (%.0f +/- %.0f) ns' % (0.5/f, 0.5/f**2 * u_f),
    #    va='bottom', ha='left')
    ax.text(0.015, 0.4, "pi = (%.4f +/- %.4f) V" % (0.5 / f, 0.5 / f ** 2 * u_f), va="bottom", ha="left")

    return (0.5 / f, 0.5 / f ** 2 * u_f)
开发者ID:wpfff,项目名称:teamdiamond_analysis,代码行数:13,代码来源:BSM_calibrations.py


示例20: fast_pi2

def fast_pi2():
    folder = toolbox.latest_data('cal_fast_pi_over_2') 
            
    a = mbi.MBIAnalysis(folder)
    a.get_sweep_pts()
    a.get_readout_results(name='adwindata')
    a.get_electron_ROC()
    #a.plot_results_vs_sweepparam(ax=ax, name='adwindata')

    x = a.sweep_pts
    y = a.p0.reshape(-1)
    u_y = a.u_p0.reshape(-1)
    n = a.sweep_name
   
    x2 = x[::2]
    y2 = y[1::2] - y[::2]
    u_y2 = np.sqrt(  u_y[1::2]**2 + u_y[::2]**2 )  
        
    fig, (ax1, ax2) = plt.subplots(1,2, figsize=(10,4), sharex=True)
    ax1.errorbar(x2, y2, yerr=u_y2, fmt='o')
    ax1.set_xlabel(n)
    ax1.set_title('Difference btw. Pi/2-Pi and Pi/2'+'\n'+a.timestamp)
    ax1.set_ylabel('Difference')
    
    m = fit.Parameter((y[-1]-y[0])/(x[-1]-x[0]), 'm')
    x0 = fit.Parameter(x2.mean(), 'x0')
    p0 = [m, x0]
    
    def ff(x):
        return m() * (x-x0())
    fitfunc_str = 'm * (x - x0)'
    
    fit_result = fit.fit1d(x2, y2, None, p0=p0, fitfunc=ff,
        fitfunc_str=fitfunc_str, do_print=True, ret=True)    
        
    ax2.errorbar(x2, y[0::2], yerr=u_y[0::2], fmt='o',
                 label='Pi/2')
    ax2.errorbar(x2, y[1::2], yerr=u_y[1::2], fmt='o',
                 label='Pi/2 - Pi')
    ax2.legend(frameon=True, framealpha=0.5)
    ax2.set_ylabel('P(0)')
    ax2.set_xlabel(n)
    if fit_result != False:
        ax2.axvline(x0(), c='k', lw=2)
        ax2.axhline(0.5, c='k', lw=2)
        ax2.set_title('X marks the spot')
    
        plot.plot_fit1d(fit_result, np.linspace(x2[0],x2[-1],201), ax=ax1,
            plot_data=False, print_info=True)
    
    return x0(), 0
开发者ID:machielblok,项目名称:analysis,代码行数:51,代码来源:BSM_calibrations.py



注:本文中的measurement.lib.tools.toolbox.latest_data函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mechanize.build_opener函数代码示例发布时间:2022-05-27
下一篇:
Python pulse.cp函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap