Skip to content

Instantly share code, notes, and snippets.

@chris-x86-64
Created December 8, 2013 05:20
Show Gist options
  • Save chris-x86-64/7853609 to your computer and use it in GitHub Desktop.
Save chris-x86-64/7853609 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
wavelength = input("Input the wavelength within 0.2~0.55um in um: ")
x = 0.389*wavelength + 0.09426/wavelength -0.3228
sigma = 4.02 * 10**(-28) / wavelength**(4 + x)
lnAB = input("Input the value of lnAB : ")
N = lnAB/sigma
print "cross section sigma/cm^-2 is : ", sigma
print "density N/(number/cm^-2) is : ", N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment