Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 31 lines (22 sloc) 875 Bytes
#!/usr/bin/env python3
Plot the scattering cross section as a function of wavelength for 1 micron water droplets
import numpy as np
import matplotlib.pyplot as plt
import miepython
num = 100
radius = 0.5 # 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(r"Water Droplets (1 $\mu$m diameter)")
plt.xlabel("Wavelength (nm)")
plt.ylabel(r"Scattering Cross Section ($\mu$m$^2$)")