Ejemplo n.º 1
0
d_beta1_G *= cs.degree
ld1_G = 2 * d_LiF * sin(beta1_G)
d_ld1_G = 2 * d_LiF * cos(beta1_G) * d_beta1_G
h1 = (cs.e * U1 / cs.c) * ld1_G
d_h1 = (cs.e * U1 / cs.c) * d_ld1_G
beta1_G2 = arcsin(ld1_G / d_LiF)
d_beta1_G2 = d_ld1_G / sqrt(d_LiF**2 - ld1_G**2)

print()
print(ms.val("n0", n1_0, d_n1_0, unit='1/s', prefix=False))
print(ms.val("s1", s1, d_s1))
print(ms.val("b1", b1, d_b1))
print(ms.val("β_G", beta1_G / cs.degree, d_beta1_G / cs.degree, unit='°', prefix=False))
print(ms.val("λ_G", ld1_G, d_ld1_G, unit='m'))
print(ms.val("h", h1, d_h1, unit='Js', prefix=False))
print(ms.sig("h,l", h1, d_h1, cs.h))
print(ms.val("β_G2", beta1_G2 / cs.degree, d_beta1_G2 / cs.degree, unit='°', prefix=False))
print()

# (p1) Analysis of the K_α, K_β peaks in first and second order
def gauss(x, mu, sigma, A):
  return A / sqrt(2 * pi * sigma**2) * exp(-(x - mu)**2 / (2 * sigma**2))

t_p1 = 20.0
beta1_p1, n1_p1 = np.loadtxt('data/255/data2.txt', unpack=True)
beta2_p1, n2_p1 = np.loadtxt('data/255/data3.txt', unpack=True)
beta3_p1, n3_p1 = np.loadtxt('data/255/data4.txt', unpack=True)
beta4_p1, n4_p1 = np.loadtxt('data/255/data5.txt', unpack=True)
d_n1_p1 = sqrt(n1_p1 * t_p1) / t_p1
d_n2_p1 = sqrt(n2_p1 * t_p1) / t_p1
d_n3_p1 = sqrt(n3_p1 * t_p1) / t_p1
Ejemplo n.º 2
0
d_s1 *= sqrt(cs.e)
b1 *= sqrt(cs.e)
d_b1 *= sqrt(cs.e)

E1_R = 4 / 3 * s1**2
d_E1_R = E1_R * (2 * d_s1 / s1)
sigma1_12 = -sqrt(4 / 3) * b1 / sqrt(E1_R)
d_sigma1_12 = sigma1_12 * sqrt((d_b1 / b1)**2 + (d_E1_R / (2 * E1_R))**2)

print()
print("K_α Radiation:")
print(ms.val("s", s1, d_s1))
print(ms.val("b", b1, d_b1))
print()
print(ms.val("E_R", E1_R / cs.e, d_E1_R / cs.e, unit='eV'))
print(ms.sig("E_R,l", E1_R, d_E1_R, cs.Rydberg * cs.h * cs.c))
print(ms.val("σ_12", sigma1_12, d_sigma1_12))
print()

# Determination of the Rydberg-energy and the screening constant for the K_β-Radiation
Z2 = npf([Z1[i] for i in range(len(Z1)) if i != 3])
E_beta = npf([7.06, 8.91, 24.59, 17.69, 9.59, 8.26, 19.58]) * cs.kilo * cs.e
d_E_beta = npf([0.17, 0.17, 0.15, 0.18, 0.17, 0.18, 0.24]) * cs.kilo * cs.e
sr_E_beta = sqrt(E_beta)
d_sr_E_beta = d_E_beta / (2 * sr_E_beta)

ms.pltext.initplot(num=2,
                   title=titles[1],
                   xlabel=r'$Z$',
                   ylabel=r'$\sqrt{E_\beta} / \sqrt{\mathrm{eV}}$',
                   fignum=True)
Ejemplo n.º 3
0
T1 = 1/0.01 * (n1[1] + n1[0]) / (n1[1] - n1[0])

s2 = n2[1] - n2[0]
d_s2 = sqrt(d_n2[1]**2 + d_n2[0]**2)
s2_p = s2 / n2[0]
d_s2_p = s2_p * sqrt((d_s2 / s2)**2 + (d_n2[0] / n2[0])**2)

T2 = 1/0.01 * (n2[1] + n2[0]) / (n2[1] - n2[0])

print()
print("Plateau-slope:")
print(ms.val('s1', s1, d_s1))
print(ms.val('s1_p', s1_p * 100, d_s1_p * 100, unit='%', prefix=False))
print()
print(ms.sig('s1,0', s1, d_s1, 0.0))
print(ms.val('T1', T1 / sc.hour, unit='hours', prefix=False))
print(ms.val('s1_p + Δs1_p', (s1_p + d_s1_p) * 100, unit='%', prefix=False))
print(ms.val('s1_p + 2 Δs1_p', (s1_p + 2 * d_s1_p) * 100, unit='%', prefix=False))
print()
print(ms.val('s2', s2, d_s2))
print(ms.val('s2_p', s2_p * 100, d_s2_p * 100, unit='%', prefix=False))
print()
print(ms.sig('s2,0', s2, d_s2, 0.0))
print(ms.val('T2', T2 / sc.hour, unit='hours', prefix=False))
print(ms.val('s2_p + Δs2_p', (s2_p + d_s2_p) * 100, unit='%', prefix=False))
print(ms.val('s2_p + 2 Δs2_p', (s2_p + 2 * d_s2_p) * 100, unit='%', prefix=False))
print()


# Propability distributions
Ejemplo n.º 4
0
wl_dsys = 2. / wl_m * sqrt(ds_dsys**2 + (wl_m_dsys / wl_m)**2)
wl_mv = mv(wl)
wl_mv_dsto = dsto_mv(wl)
wl_mv_dsys = dsys_mv(wl_dsys)
wl_mv_dtot = dtot(wl_mv_dsys, wl_mv_dsto)

print()
print('Wellenlänge Laser:')
print(
    tbl([
        lst(ds, ds_dsys, 'ds'),
        lst(wl_m, wl_m_dsys, 'm'),
        lst(wl, wl_dsys, 'wl')
    ], ))
print(val('Mitellwert', wl_mv, wl_mv_dtot))
print(sig('Abweichung', wl_mv, wl_mv_dtot, wl_lit, wl_lit_dsys))

# Brechungsindex Luft
pltext.initplot(num=1,
                title='Brechungsindex Luft',
                xlabel='Intensitätsringe',
                ylabel='Druck in Pa')
[sl1, dsl1, tmp, tmp] = linreg(bi_m1,
                               bi_p1,
                               bi_p1_dsys,
                               plot=True,
                               graphname='1. Durchgang')
[sl2, dsl2, tmp, tmp] = linreg(bi_m2,
                               bi_p2,
                               bi_p2_dsys,
                               plot=True,
Ejemplo n.º 5
0
V_ew_274k = Uaw_274k / U1w
V_ew_274k_dsys = 1/U1w * sqrt(Uaw_274k_dsys**2 + (Uaw_274k * U1w_dsys / U1w)**2)
V_ew_274k_mv = mv(V_ew_274k)
V_ew_274k_mv_dtot = dtot_mv(V_ew_274k,V_ew_274k_dsys)

V_ew_680k = Uaw_680k / U1w
V_ew_680k_dsys = 1/U1w * sqrt(Uaw_680k_dsys**2 + (Uaw_680k * U1w_dsys / U1w)**2)
V_ew_680k_mv = mv(V_ew_680k)
V_ew_680k_mv_dtot = dtot_mv(V_ew_680k,V_ew_680k_dsys)

R_E = 3e3
R_G = npfarray([48.7e3,274e3,680e3])
V_t = R_G / R_E

print('\nAufgabe 1:\n')
print(tbl([['Widerstand','48k7 (g)','274k (g)','274k (w)','680k (w)'],lst([V_t[0],V_t[1],V_t[1],V_t[2]],name='V_t'),lst([V_eg_48k7_mv,V_eg_274k_mv,V_ew_274k_mv,V_ew_680k_mv],[V_eg_48k7_mv_dtot,V_eg_274k_mv_dtot,V_ew_274k_mv_dtot,V_ew_680k_mv_dtot],'V_e'),['Abw',sig('',V_eg_48k7_mv,V_eg_48k7_mv_dtot,V_t[0],perc=True),sig('',V_eg_274k_mv,V_eg_274k_mv_dtot,V_t[1],perc=True),sig('',V_ew_274k_mv,V_ew_274k_mv_dtot,V_t[1],perc=True),sig('',V_ew_680k_mv,V_ew_680k_mv_dtot,V_t[2],perc=True)]]))
print('\nEinzelwerte für 48k7 (g):\n')
print(tbl([lst(V_eg_48k7,V_eg_48k7_dsys,'Verstärkung'),dev(V_eg_48k7,V_eg_48k7_dsys,V_t[0],name='Abw',perc=True)]))
print('\nEinzelwerte für 274k (g):\n')
print(tbl([lst(V_eg_274k,V_eg_274k_dsys,'Verstärkung'),dev(V_eg_274k,V_eg_274k_dsys,V_t[1],name='Abw',perc=True)]))
print('\nEinzelwerte für 274k (w):\n')
print(tbl([lst(V_ew_274k,V_ew_274k_dsys,'Verstärkung'),dev(V_ew_274k,V_ew_274k_dsys,V_t[1],name='Abw',perc=True)]))
print('\nEinzelwerte für 680k (w):\n')
print(tbl([lst(V_ew_680k,V_ew_680k_dsys,'Verstärkung'),dev(V_ew_680k,V_ew_680k_dsys,V_t[2],name='Abw',perc=True)]))

# Plots
f_uncert = 50e-6

f_1 = npfarray([0.3,0.6,0.9,3,6,9,30,60,90,150,200,300])*1e3
f_1_dsys = f_1 * f_uncert
U_A1 = npfarray([6.76,6.70,6.68,5.46,3.82,2.78,0.900,0.456,0.306,0.187,0.140,0.095])
Ejemplo n.º 6
0
                title='Kumulative Verteilung der Verschiebungsquadrate',
                xlabel='Zeit in s',
                ylabel='Summe $r_i^2$ in μm')
pltext.plotdata(t[:-1], r_kum)
plt.plot(t[:-1], lin(t[:-1], slope, yitc), label='Ausgleichsgerade')
plt.plot(t[:-1],
         lin(t[:-1], slope - slope_dtot, yitc + yitc_dtot),
         label='Fehlergerade')
plt.xlim(0.0, 177.0)
plt.ylim(-0.04e-10, 2.20e-10)
plt.legend(loc='upper left')
plt.savefig('fig3.pdf', format='pdf')

print()
print('Kumulative Verteilung:')
print(val('Steigung', slope, slope_dtot))
print(val('Diffusionskonstante D', vert_D, vert_D_dtot))
print(val('Bolatzmannkonstante k', vert_kB, vert_kB_dtot))

# Vergleich der Werte
print()
print('Vergleich der Werte zueinander:')
print(sig('Abweichung', hist_kB, hist_kB_dtot, vert_kB, vert_kB_dtot))
print()
print('Vergleich mit dem Literaturwert:')
print(sig('Mittelung', hist_kB, hist_kB_dtot, kB))
print(sig('Kumulativ', vert_kB, vert_kB_dtot, kB))
print()

plt.show()
Ejemplo n.º 7
0
print("Absorption of β-Radiation")
print(
    ms.val("sl",
           sl_Sr * cs.milli,
           d_sl_Sr * cs.milli,
           unit='1/(mm s)',
           prefix=False))
print(ms.val("i", i_Sr, d_i_Sr, unit='1/s', prefix=False))
print(ms.val("R", R_Sr, d_R_Sr, unit='m'))
print(
    ms.val("σ",
           sigma_Sr * cs.centi**2 / cs.gram,
           d_sigma_Sr * cs.centi**2 / cs.gram,
           unit='g/cm²'))
print(ms.val("E", 2.3e6, 0.8e6, unit='eV'))
print(ms.sig("E", 2.3e6, 0.8e6, 2.274e6))
print()

# Measurement of γ-Radiation absorption, Co 60, UB 595
a_Co = 150 * cs.milli
d_a_Co = 2 * cs.milli
t_Co = cs.minute
n_Co = npf([2447, 1760, 1279, 908, 714, 541, 412, 312, 223, 195, 164])
d_n_Co = sqrt(n_Co)
n_Co = (n_Co / t_Co - n0)
d_n_Co = sqrt((d_n_Co / t_Co)**2 + d_n0**2)
d_Co = np.arange(0.0, 5 * cs.milli * len(n_Co), 5 * cs.milli)

ms.pltext.initplot(num=3,
                   title=titles[1],
                   xlabel=r'$d$ / mm',
Ejemplo n.º 8
0
T0 = ms.mean_value(t0) / n0
n1 = 2 * l * dt / (0.3 * T0 * dl)
print()
print(ms.val("n1", int(n1 + 0.5)))
print()
print(ms.val("gl", gl, dgl))

# Simple calculation
T = t / n
dT = dt / n
gs = 4 * ms.pi**2 * l / T**2
dgs = 4 * ms.pi**2 / T**2 * ms.sqrt(dl**2 + (2 * l * dT / T)**2)

print()
print(ms.val("gs", gs, dgs))
print(ms.sig("dev gs & gl", gs, dgs, gl, dgl))

# Complex calculation
mk = rhoe * 4 / 3 * ms.pi * rk**3
dmk = rhoe * 4 * ms.pi * rk**2 * drk # Wrong uncertainty calculation
mf = rhoe * ms.pi * rf**2 * (lp - 2 * rk)
dmf = rhoe * ms.pi * rf**2 * ms.sqrt(dlp**2 + 4 * drk**2)

ts = [50 * T * i for i in range(len(s))]
dts = [50 * i * dT for i in range(len(ts))] # Wrong uncertainty calculation
s = [sn - s[i] for i in range(len(s))]
ds = [ms.sqrt(dsn**2 + ds[i]**2) for i in range(len(ds))]
phi = [ms.arctan(s[i] / sa) for i in range(len(s))]
dphi = [1 / (s[i]**2 + sa**2) * ms.sqrt((s[i] * dsa)**2 + (sa * ds[i])**2) for i in range(len(s))]
phi0 = ms.mean_value(phi)
dphi0 = ms.std_dev_m(phi) # I do not think one should calculate the uncertainty like that, because the deviation of the values is naturally very high
Ejemplo n.º 9
0
b_thalb = ln(2) * tau
b_thalb_dsys = ln(2) * tau_dsys

print()
print('Aufgabe 1:\n')
print(
    tbl([
        lst(R_A1, R_A1_dsys, 'R'),
        lst(C_A1, C_A1_dsys, 'C'),
        lst(tau, tau_dsys, 'Tau')
    ]))
print(
    tbl([
        lst(b_thalb, b_thalb_dsys, 'T_1/2 (b)'),
        lst(g_thalb, g_thalb_dsys, 'T_1/2 (g)'), ['Abw'] + [
            sig('', b_thalb[i], b_thalb_dsys[i], g_thalb[i], g_thalb_dsys[i])
            for i in range(len(b_thalb))
        ]
    ]))

# Aufgabe 3
R_A3 = 1e3
R_A3_dsys = 0.05 * R_A3
C_A3 = 47e-9
C_A3_dsys = 0.05 * C_A3

f_A3 = npfarray([1, 2, 3, 3.58, 4, 5, 6, 7, 8, 9, 10]) * 1e3
dt = npfarray([200, 83, 46, 30, 27.2, 18.8, 14.0, 10.4, 8.0, 6.8, 4.1]) * 1e-6
dt_dsys = npfarray([20, 5, 5, 5, 3.0, 2.5, 2.5, 2.0, 1.5, 1.5, 1.0]) * 1e-6
Phi = 2 * pi * f_A3 * dt
Phi_dsys = 2 * pi * f_A3 * dt_dsys
Ejemplo n.º 10
0
                       p0=p0)

sqrt_Er_alpha = popt[0]
Delta_sqrt_Er_alpha = sqrt(pcov[0, 0])
sig12_alpha = popt[1]
Delta_sig12_alpha = sqrt(pcov[1, 1])

plt.plot(Z, fit_func_alpha(Z, *popt))

print()
print('K_alpha:')
print(val('sqrt(Er)', sqrt_Er_alpha, Delta_sqrt_Er_alpha))
print(
    sig('Abweichung',
        sqrt_Er_alpha,
        Delta_sqrt_Er_alpha,
        sqrt_Er_lit,
        perc=True))
print(val('sig12', sig12_alpha, Delta_sig12_alpha))
print(sig('Abweichung', sig12_alpha, Delta_sig12_alpha, sig12_lit, perc=True))

# K_beta mit Ti

K_beta = npfarray([7.05, 19.56, 8.95, 17.46, 24.59, 17.67, 9.63, 8.30])
Delta_K_beta = npfarray([0.19, 0.16, 0.17, 0.32, 0.14, 0.17, 0.15, 0.16])
sqrt_K_beta = sqrt(K_beta)
Delta_sqrt_K_beta = 1 / 2 * 1 / sqrt(K_beta) * Delta_K_beta

pltext.initplot(num=2,
                title=r'$\sqrt{E_\beta}$ als Funktion von $Z$',
                xlabel=r'$Z$',
Ejemplo n.º 11
0
w0 = 2 * ms.pi / T
dw0 = 2 * ms.pi / T**2 * dT

delta_rm1 = w0 * bn1 / (2 * bmax1)
dDelta_rm1 = 1 / (2 * bmax1) * ms.sqrt((w0 * dbn1)**2 + (bn1 * dw0)**2 + (w0 * bn1 * dbmax1 / bmax1)**2)
delta_rm2 = w0 * bn2 / (2 * bmax2)
dDelta_rm2 = 1 / (2 * bmax2) * ms.sqrt((w0 * dbn2)**2 + (bn2 * dw0)**2 + (w0 * bn2 * dbmax2 / bmax2)**2)

print()
print(ms.val("bn1", bn1, dbn1))
print(ms.val("bmax1", bmax1, dbmax1))
print(ms.val("bn2", bn2, dbn2))
print(ms.val("bmax2", bmax2, dbmax2))
print()
print(ms.val("delta_rm1", delta_rm1, dDelta_rm1))
print(ms.val("delta_rm2", delta_rm2, dDelta_rm2))

# Comparision
print("\n1:")
print(ms.sig("ha vs hm", delta_ha1, delta_hm1, dDelta_ha1, dDelta_hm1))
print(ms.sig("ha vs rm", delta_ha1, delta_rm1, dDelta_ha1, dDelta_rm1))
print(ms.sig("hm vs rm", delta_hm1, delta_rm1, dDelta_hm1, dDelta_rm1))
print(ms.val("mean value", 1 / 3 * (delta_ha1 + delta_hm1 + delta_rm1), 1 / 3 * ms.sqrt(dDelta_ha1**2 + dDelta_hm1**2 + dDelta_rm1**2)))

print("\n2:")
print(ms.sig("ha vs hm", delta_ha2, delta_hm2, dDelta_ha2, dDelta_hm2))
print(ms.sig("ha vs rm", delta_ha2, delta_rm2, dDelta_ha2, dDelta_rm2))
print(ms.sig("hm vs rm", delta_hm2, delta_rm2, dDelta_hm2, dDelta_rm2))
print(ms.val("mean value", 1 / 3 * (delta_ha2 + delta_hm2 + delta_rm2), 1 / 3 * ms.sqrt(dDelta_ha2**2 + dDelta_hm2**2 + dDelta_rm2**2)))
Ejemplo n.º 12
0
cd_k = h1 / (h1 - h3)
cd_k_dsys = hi_dsys / (h1 - h3) * sqrt((1 + h1 / (h1 - h3))**2 +
                                       (1 / (h1 - h3))**2)

cd_k_mv = mv(cd_k)
cd_k_dsto_mv = dsto_mv(cd_k)
cd_k_dsys_mv = dsys_mv(cd_k_dsys)
cd_k_dtot = sqrt(cd_k_dsto_mv**2 + cd_k_dsys_mv**2)

print()
print('Clément & Desormes:')
print()
print(tbl(['h1', 'h3', 'k'], [h1, h3, cd_k], [hi_dsys, hi_dsys, cd_k_dsys]))
print()
print(val('k', cd_k_mv, cd_k_dtot))
print(sig('dev', cd_k_mv, cd_k_dtot, k_air_lit))

# Rüchardt
r_air = rh_2r_air / 2.
r_air_dsys = rh_2r_dsys / 2.
T_air = rh_50T_air / 50.
T_air_dsys = rh_50T_dsys / 50.
rh_k_air = 4. * rh_m_air * rh_V_air / (r_air**4 * T_air**2 * rh_p)
rh_k_air_dsys = 4. / (r_air**4 * T_air**2 * rh_p) * sqrt(
    (rh_m_dsys * rh_V_air)**2 + (rh_m_air * rh_V_dsys)**2 +
    (rh_m_air * rh_V_air)**2 * ((4. * r_air_dsys / r_air)**2 +
                                (2. * T_air_dsys / T_air)**2 +
                                (rh_p_dsys / rh_p)**2))

r_arg = rh_2r_arg / 2.
r_arg_dsys = rh_2r_dsys / 2.
Ejemplo n.º 13
0
# measure version: 1.3
from measure import h,e,c,val,lst,sqrt,plot,sig,chi2,chi2_red

# Frauenhoferlinien
# Measured Values
wl = [393e-9, 397e-9, 430e-9, 486e-9, 517e-9, 527e-9, 656e-9, 687e-9]
dwl = 1e-9
fwl = [393.4e-9, 396.8e-9, 430.8e-9, 486.1e-9, 518.4e-9, 527.0e-9, 656.3e-9, 686.7e-9]

print()
print("Frauenhoferlinien:")
for i in range(len(wl)):
  print(sig("{0:03.1f}".format(fwl[i]*1e9)+"nm", wl[i], dwl, fwl[i]))

print()
print("Nicht eindeutig:")
print(sig("587.6nm", 589e-9, dwl, 587.6e-9))
print(sig("589.0nm", 589e-9, dwl, 589.0e-9))
print(sig("589.6nm", 589e-9, dwl, 589.6e-9))

# Natrium
# Measured Values
wl = [331e-9, 395e-9, 404e-9, 416e-9, 420e-9, 427e-9, 430e-9, 434e-9, 439e-9, 442e-9, 449e-9, 454e-9, 467e-9, 475e-9, 498e-9, 515e-9, 525e-9, 568e-9, 589e-9, 668e-9, 675e-9, 687e-9, 696e-9, 703e-9, 707e-9, 715e-9, 720e-9, 727e-9, 738e-9, 751e-9, 763e-9, 770e-9, 773e-9, 795e-9, 801e-9, 811e-9, 819e-9]
dwl = [1.5e-9 for i in wl]

# Wellenlängen 1. Nebenserie
ns1 = [819e-9]
m = 3
Eryd = -13.605
E3p = Eryd / m**2 - h / e * c / ns1[0]
Ejemplo n.º 14
0
tblstr = ['1@15', '1@20', '2@15', '2@20']

print()
print('Frequency f:')
print(
    tbl(tblstr, [f_m1x15, f_m1x20, f_m2x15, f_m2x20],
        [df_m1x15, df_m1x20, df_m2x15, df_m2x20]))
print()
print('Linreg results (slope / yitc):')
print(
    tbl(tblstr, [[slope_1x15, yitc_1x15], [slope_1x20, yitc_1x20],
                 [slope_2x15, yitc_2x15], [slope_2x20, yitc_2x20]],
        [[dslope_1x15, dyitc_1x15], [dslope_1x20, dyitc_1x20],
         [dslope_2x15, dyitc_2x15], [dslope_2x20, dyitc_2x20]]))
print()
print(sig('0-yitc 1@15', yitc_1x15, dyitc_1x15, 0.0))
print(sig('0-yitc 1@20', yitc_1x20, dyitc_1x20, 0.0))
print(sig('0-yitc 2@15', yitc_2x15, dyitc_2x15, 0.0))
print(sig('0-yitc 2@20', yitc_2x20, dyitc_2x20, 0.0))
print()
print(lst('Moment of anertia Iz', Iz_list, dIz_list))
print()
print(val('Iz (mean value)', Iz, Iz_dtot))

# color frequency
Omega = 2. * pi * 10. / cf_10u
dOmega = 2. * pi * 10. * cf_d10u / cf_10u**2
wf = 2. * pi * cf_f
dwf = 2. * pi * cf_df

cfplot = plot(
Ejemplo n.º 15
0
# Determination of the magnetic field at the center of the helmholtz coil
ms.pltext.initplot(num=2, title='Induzierte Spannung in Abhängigkeit der Rotationsfrequenz bei konstantem Strom und Gleichspannung', xlabel='f / Hz', ylabel='U / V', fignum=True)
[s1, d_s1, tmp, tmp] = ms.linreg(f1, U1_i, d_U1_i, d_f1, plot=True)
ms.pltext.initplot(num=3, title='Induzierte Spannung in Abhängigkeit des Spulenstroms bei konstanter Rotationsfrequenz und Gleichspannung', xlabel='I / A', ylabel='U / V', fignum=True)
ms.linreg(I2, U2_i, d_U2_i, d_I2, plot=True)

B1 = s1 / (2 * pi * n_i * A_i)
d_B1 = d_s1 / (2 * pi * n_i * A_i)

B1_ = (8 / sqrt(125)) * sc.mu_0 * I1 * n_h / r_h
d_B1_ = (8 / sqrt(125)) * sc.mu_0 * d_I1 * n_h / r_h

print(ms.val("s1", s1, d_s1))
print(ms.val("B1", B1, d_B1, unit='T'))
print(ms.val("B1'", B1_, d_B1_, unit='T'))
print(ms.sig("B1,B1'", B1, d_B1, B1_, d_B1_))
print()

# Determination of the inductance of the helmholtz coil
ms.pltext.initplot(num=4, title='Amplitude der Induktionsspannung in Abhängigkeit des Winkels bei Wechselspannung', xlabel='α / °', ylabel='U / V', fignum=True)
ms.pltext.plotdata(α3, U3_i, d_U3_i, d_α3, connect=True)

Ui_U_ratio = U4_i / U4
d_Ui_U_ratio = Ui_U_ratio * sqrt((d_U4_i / U4_i)**2 + (d_U4 / U4)**2)
ms.pltext.initplot(num=5, title='Verhältnis der Induktionsspannungsamplitude zur Spulenspannungsamplitude\nin Abhängigkeit der Spannungsfrequenz bei Wechselspannung', xlabel='f / Hz', ylabel='Ui / U', fignum=True)
ms.pltext.plotdata(f4, Ui_U_ratio, d_Ui_U_ratio, d_f4, connect=True)

U_I_ratio = U4 / I4
d_U_I_ratio = U_I_ratio * sqrt((d_U4 / U4)**2 + (d_I4 / I4)**2)
ms.pltext.initplot(num=6, title='Widerstand der Helmholtzspule in Abhängigkeit der Spannungsfrequenz bei Welchselspannung', xlabel='f / Hz', ylabel='R / Ω', fignum=True)
[s4, d_s4, i_4, d_i4] = ms.linreg(f4, U_I_ratio, d_U_I_ratio, d_f4, plot=True, fit_range=range(10,len(f4)))
Ejemplo n.º 16
0
d_τ1_Ag = ln(2) * d_λ1_Ag / λ1_Ag**2
τ2_Ag = ln(2) / λ2_Ag
d_τ2_Ag = ln(2) * d_λ2_Ag / λ2_Ag**2

print("Ag108, Ag110 decay:")
print(ms.val("A1", A1_Ag, d_A1_Ag, unit='Bq'))
print(ms.val("λ1", λ1_Ag, d_λ1_Ag, unit='1/s', prefix=False))
print(ms.val("A2", A2_Ag, d_A2_Ag, unit='Bq'))
print(ms.val("λ2", λ2_Ag, d_λ2_Ag, unit='1/s', prefix=False))
print(ms.val("χ²", χ2_Ag))
print(ms.val("χr²", χ2_Ag_red))
print(ms.val("pfit", 100 * p_Ag_fit, unit='%'))
print()
print("Half life of Ag110:")
print(ms.val("τ", τ1_Ag, d_τ1_Ag, unit='s'))
print(ms.sig("τ", τ1_Ag, d_τ1_Ag, 24.6))
print("Half life of Ag108:")
print(ms.val("τ", τ2_Ag / cs.minute, d_τ2_Ag / cs.minute, unit='min'))
print(ms.sig("τ", τ2_Ag, d_τ2_Ag, 2.37 * cs.minute))
print()

# In decay
t_In = np.arange(ΔT_In / 2, T_In + ΔT_In / 2, ΔT_In)
d_n_In = sqrt(n_In) / ΔT_In
n_In = n_In / ΔT_In
n_In = n_In - n0_m
d_n_In = sqrt(d_n_In**2 + d_n0_m**2)

[A_In, λ_In], pcov = curve_fit(f_In,
                               t_In[1:],
                               n_In[1:],