Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # coding: utf-8
- # In[15]:
- import numpy as np
- import matplotlib.pyplot as plt
- from uncertainties import *
- from uncertainties.umath import *
- #measurement of the distance d
- b1 = ufloat(866 - 50, 1) #mm since the scale was a milimeter scale we have an uncertainty of +/- 1 mm
- f = ufloat(11, 0.5) #mm
- a = 1/(1/f - 1/b1)
- d1 = ufloat(25.5, 1)/4 #mm
- d = d1 * a/b1 #mm
- print("Distance d between two maxima in mm {:.4u}".format(d))
- # In[19]:
- #measurement of the angle ß between the two rays and the calc of the wavelength
- L1 = ufloat(950 - 836, 1) #mm
- B1 = ufloat(836 - 50, 1) #mm
- l1 = ufloat(45, 1) #mm
- A1 = 1/(1/f - 1/B1) #mm
- l = l1 * A1/B1 #mm
- beta = l/(L1-A1) #rad
- wavel = 2 * d * sin(beta/2)#mm
- print("Wavelength in nm {:.4u}".format(wavel * 10**6))
- print("Expected Wavelength in nm", 532.0)
- # In[20]:
- #measurement of the wire thickness
- b2 = ufloat(0.1, 0.05) #mm with their rounding convention, wire thickness
- S = ufloat(1296 - 50, 1) #mm
- print(S)
- d_ber = wavel * S/b2 #mm
- d_exp = ufloat(65.5, 1)/10 #mm
- print("Distance d_ber from the formula in mm {:.4u}".format(d_ber))
- print("Distance d_exp from the measurement in mm {:.4u}".format(d_exp))
- # In[21]:
- #measurement of the slit width
- C2 = ufloat(150, 1) #mm
- L2 = ufloat(1130 - 798, 1) #mm
- B2 = ufloat(798- 50, 1) #mm
- A2 = 1/(1/f - 1/B2) #mm
- b_prime = ufloat(14, 1) #mm
- b_bar = b_prime * A2/B2 #mm
- b3 = b_bar * C2/(L2 - A2) #mm
- print("{:.4u}".format(b_bar))
- print("Slit width b in mm {:.4u}".format(b3))
- # In[5]:
- #diffraction lykopodium
- L3 = ufloat(1220 - 50, 1) #mm
- rho = ufloat(50.5, 1)/2 #mm
- D1_exp = 1.22 * L3 * wavel/rho #mm
- D1_micr = 0.02736 #mm
- print("Diameter of the lykopodium platelets in mm, measured with rho1 {:.4u}".format(D1_exp))
- # In[6]:
- #diameter circular aperture
- L4 = ufloat(1315 -50, 1) #mm
- rho1 = ufloat(4.5, 1)/2 #mm
- rho2 = ufloat(8.5, 1)/2 #mm
- D1 = 1.22 * L4 * wavel/rho1
- D2 = 2.23 * L4 * wavel/rho2
- print("Diameter with rho1 in mm {:.4u}".format(D1))
- print("Diameter with rho2 in mm {:.4u}".format(D2))
- D_av = (D1 + D2)/2
- print("Diameter in average in mm {:.4u}".format(D_av))
- #hair thickness
- L5 = ufloat(1317 - 50, 1) #mm
- d5 = ufloat(85.5, 1)/10 #mm
- b5 = wavel * L5/d5
- print("Hair thickness of Hagen in mm {:.4u}".format(b5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement