Skip to content

Instantly share code, notes, and snippets.

@YukiSakamoto
Created October 28, 2019 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YukiSakamoto/f7d7d854bd42648d971f4b5a86c56202 to your computer and use it in GitHub Desktop.
Save YukiSakamoto/f7d7d854bd42648d971f4b5a86c56202 to your computer and use it in GitHub Desktop.
test
def wl2wn( lambda_in_nm )
return 10000000.0/lambda_in_nm
end
def diff_cross_section(wn)
return 5e-48 * (wn - 2331.0)**4
end
[633, 515, 488, 458, 436].each do |wavelength|
puts "#{wavelength}\t#{1.0e32*diff_cross_section(wl2wn(wavelength))}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment