Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 2.64 KB

File metadata and controls

63 lines (40 loc) · 2.64 KB

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.

Usage

Simple Example

import miepython

m = 1.5  # index of refraction of sphere
x = 1.0  # dimensionless Mie size parameter

qext, qsca, qback, g = miepython.mie(m,x)
print("The scattering efficiency  is %.3f" % qsca)
print("The backscatter efficiency is %.3f" % qback)
print("The scattering anisotropy  is %.3f" % g)

The scattering efficiency is 0.215

The backscatter efficiency is 0.187

The scattering anisotropy is 0.199

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.