Skip to content

Mie scattering of light off perfect spheres in python

License

Notifications You must be signed in to change notification settings

nkourkou/miepython

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miepython

miepython is a pure Python module to calculate light scattering by non-absorbing, partially-absorbing, or perfectly conducting spheres. Mie theory is used, following the procedure in given by Wiscombe and validated against his results.

This code provides functions for calculating the extinction efficiency, scattering efficiency, backscattering, and scattering asymmetry. Moreover, a set of angles can be given to calculate the scattering for a sphere.

When comparing different Mie scattering codes, make sure that you're aware of the conventions used by each code. miepython makes the following assumptions

  1. the imaginary part of the complex index of refraction for absorbing spheres is negative.
  2. the scattering phase function is normalized so it equals the single scattering albedo when integrated over 4π steradians.

Usage

Simple Example

m = 1.5-1j
x = 1
qext, qsca, qback, g = miepython.mie(m,x)

print("The extinction efficiency  is %.3f" % qext)
print("The scattering efficiency  is %.3f" % qsca)
print("The backscatter efficiency is %.3f" % qback)
print("The scattering anisotropy  is %.3f" % g)
> The extinction efficiency  is 2.336
> The scattering efficiency  is 0.663
> The backscatter efficiency is 0.573
> The scattering anisotropy  is 0.192

Detailed Documentation

Short Scripts

Gory Details

Installation

pip install miepython

To uninstall:

pip uninstall miepython

License

miepython is licensed under the terms of the MIT license.

About

Mie scattering of light off perfect spheres in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%