示例#1
0
def test_ex_ridme_fit(): 
    "Check the RIDME experimental model in fitting."

    experiment = ex_ridme(tau1,tau2, pathways=[1,2,3])
    Vmodel = dipolarmodel(tridme,r,Bmodel=bg_hom3d,experiment=experiment)
    result = fit(Vmodel,Vridme,nonlin_tol=1e-3)

    assert np.allclose(Vridme,result.model,atol=1e-2) and ovl(result.P/1e5,Pr)>0.975
示例#2
0
def test_ex_sifter_fit(): 
    "Check the SIFTER experimental model in fitting."

    experiment = ex_sifter(tau1,tau2)
    Vmodel = dipolarmodel(tsifter,r,Bmodel=bg_hom3d,experiment=experiment)
    result = fit(Vmodel,Vsifter,nonlin_tol=1e-3)

    assert np.allclose(Vsifter,result.model,atol=1e-2) and ovl(result.P/1e5,Pr)>0.975
示例#3
0
def test_ex_fwd5pdeer_fit(): 
    "Check the forward 5-pulse DEER experimental model in fitting."

    experiment = ex_fwd5pdeer(tau1,tau2,tau3, pathways=[1,2,3])
    Vmodel = dipolarmodel(tdeer,r,Bmodel=bg_hom3d,experiment=experiment)
    result = fit(Vmodel,Vfwd5pdeer,nonlin_tol=1e-3)

    assert np.allclose(Vfwd5pdeer,result.model,atol=1e-2) and ovl(result.P/1e5,Pr)>0.975
示例#4
0
def test_ex_4pdeer_fit(): 
    "Check the 4-pulse DEER experimental model."

    experiment = ex_4pdeer(tau1,tau2, pathways=[1,2])
    Vmodel = dipolarmodel(tdeer,r,Bmodel=bg_hom3d,experiment=experiment)
    result = fit(Vmodel,V4pdeer,nonlin_tol=1e-3)

    assert np.allclose(V4pdeer,result.model,atol=1e-2) and ovl(result.P/1e5,Pr)>0.975
示例#5
0
def test_fit_Pnonparametric(): 
    "Check that the model with one dipolar pathway is correct"

    Vmodel = dipolarmodel(t,r,Bmodel=bg_hom3d,npathways=1)
    
    result = fit(Vmodel,V1path,nonlin_tol=1e-5)

    assert ovl(result.P/1e5,Pr)>0.975
示例#6
0
def test_ex_5pdeer_fit():
    "Check the 5-pulse DEER experimental model in fitting."

    experiment = ex_5pdeer(tau1, tau2, tau3)
    Vmodel = dipolarmodel(t,
                          r,
                          Bmodel=bg_hom3d,
                          npathways=2,
                          experiment=experiment)
    result = fit(Vmodel, V5pulse, nonlin_tol=1e-3)

    assert np.allclose(V5pulse, result.model,
                       atol=1e-2) and ovl(result.P / 1e5, Pr) > 0.975