Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 31 lines (22 sloc) 781 Bytes
#!/usr/bin/env python3
Plot the scattering efficiency as a function of wavelength for 4micron glass spheres
import numpy as np
import matplotlib.pyplot as plt
import miepython
num = 100
radius = 2 # in microns
lam = np.linspace(0.2,1.2,num) # also in microns
x = 2*np.pi*radius/lam
# from
qqsca = np.zeros(num)
for i in range(num) :
qext, qsca, qback, g = miepython.mie(m[i],x[i])
plt.title("BK7 glass spheres 4 micron diameter")
plt.xlabel("Wavelength (nm)")
plt.ylabel("Scattering Efficiency (-)")