コード例 #1
0
ファイル: analysis.py プロジェクト: pshchelo/vampy
def elastic_evans(tau, alpha, tau_sd, alpha_sd):
    fit = fitting.odrlin(tau, alpha, tau_sd, alpha_sd)
    slope, intercept = fit.beta
    slope_sd, intercept_sd = fit.sd_beta
    elas = 1/slope
    elas_sd = slope_sd/(slope*slope)
    return slope, intercept, elas, elas_sd
コード例 #2
0
def elastic_evans(tau, alpha, tau_sd, alpha_sd):
    fit = fitting.odrlin(tau, alpha, tau_sd, alpha_sd)
    slope, intercept = fit.beta
    slope_sd, intercept_sd = fit.sd_beta
    elas = 1 / slope
    elas_sd = slope_sd / (slope * slope)
    return slope, intercept, elas, elas_sd
コード例 #3
0
ファイル: analysis.py プロジェクト: pshchelo/vampy
def bending_evans(tau, alpha, tau_sd, alpha_sd):
    fit = fitting.odrlin(log(tau), alpha, tau_sd/tau, alpha_sd)
    slope, intercept = fit.beta
    slope_sd, intercept_sd = fit.sd_beta
    bend = 1/(8*pi*slope)
    bend_sd = slope_sd/(8*pi*slope*slope)
#    tau0 = exp(-intercept/slope)
#    tau0_sd = sqrt(slope*slope*intercept_sd*intercept_sd + slope_sd*slope_sd*intercept*intercept)*tau0/(slope_sd*slope_sd)
    return slope, intercept, bend, bend_sd
コード例 #4
0
def bending_evans(tau, alpha, tau_sd, alpha_sd):
    fit = fitting.odrlin(log(tau), alpha, tau_sd / tau, alpha_sd)
    slope, intercept = fit.beta
    slope_sd, intercept_sd = fit.sd_beta
    bend = 1 / (8 * pi * slope)
    bend_sd = slope_sd / (8 * pi * slope * slope)
    #    tau0 = exp(-intercept/slope)
    #    tau0_sd = sqrt(slope*slope*intercept_sd*intercept_sd + slope_sd*slope_sd*intercept*intercept)*tau0/(slope_sd*slope_sd)
    return slope, intercept, bend, bend_sd