Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
159 lines (91 sloc) 8.68 KB

Online user's guide for the Python Mie Scattering package (PyMieScatt)

Documentation is always under development, but mostly complete. A manuscript communicating the development of the inverse Mie algorithms was published by the Journal of Quantative Spectroscopy and Radiative Transfer. The JQSRT article is available here.

NOTE TO USERS: When using PyMieScatt, pay close attention to the units of the your inputs and outputs. Wavelength and particle diameters are always in nanometers, efficiencies are unitless, cross-sections are in nm2, coefficients are in Mm-1, and size distribution concentration is always in cm-3. If you use other units, your outputs may not make sense.

NOTE TO THOSE WITH MIEPLOT EXPERIENCE: The functions in PyMieScatt take particle diameter. MiePlot's default is to take the particle radius in micrometers. Make sure all your particle dimensions, whether for a single particle or for a distribution, are for the diamaters, in nanometers.

Install PyMieScatt

NOTE: You must install Shapely first, preferably from GitHub. Users have reported difficulty installing it with pip. Conda works, too.

The current version is 1.7.4. You can install PyMieScatt from The Python Package Index (PyPI) with

$ pip install PyMieScatt

or from GitHub. Clone the repository and then run

$ python install

Revision Notes - version 1.7.4 (6 May, 2019)

Revision History

  • 1.7.3 (23 August, 2018) - 1.7.2 was skipped ¯\_(ツ)_/¯
  • 1.7.1 (12 April, 2018)
  • 1.7.0 (5 April, 2018)
    • Updated most of the forward homogeneous sphere functions with a new optional parameter nMedium, which allows for Mie calculations in media other than vacuum/air. Please see documentation.
  • 1.6.0b0 (23 March, 2018)
  • 1.5.2 (9 March, 2018)
  • 1.5.1 (7 March, 2018)
  • 1.4.3 (21 February, 2018)
  • 1.4.2 (25 January, 2018)
    • Very minor adjustment to :py:func:`AutoMieQ`; changed the crossover from Rayleigh to Mie to x=0.01 (previously 0.5). Thanks to John Kendrick for the suggestion.
  • 1.4.1 (25 January, 2018)
    • Added Shapely support! Shapely is a geometric manipulation and analysis package. I wrote it in as a slightly faster, more robust way to look for intersections in n-k space when doing inversions. It also makes the code more readable and makes it clearer how the intersection method works, especially when including backscatter to find a unique solution. There is no change to the user experience, other than slight speedups.
  • 1.3.7
  • 1.3.6
  • 1.3.5
    • Fixed a bug that prevented SF_SD from properly scaling with the number of particles.
    • Added a new sub-version delimiter. 1.x.y.z will be for minor revisions including some optimizations I've been working on that don't merit a full 1.x.y release.
    • Added a new AutoMie_ab() function that uses LowFrequencyMie_ab() for x = πd/λ < 0.5 and Mie_ab() otherwise.
    • Sped up the MieS1S2() function by using the new AutoMie_ab() function.
    • Sped up the SF_SD() function by about 33% (on average) when the MieS1S2() optimizations are considered.
    • Added Mie_cd() to
  • 1.3.4
    • Fixed a really dumb bug introduced in 1.3.3.
  • 1.3.3
    • Fixed a big that caused SF_SD() to throw errors when a custom angle range was specified.
    • Added MieS1S2() and MiePiTau() to Dunno why they weren't always there.
  • 1.3.2
    • Renamed GraphicalInversion() and GraphicalInversion_SD() to ContourIntersection() and ContourIntersection_SD(), respectively.
  • 1.3.1
    • Optimizations to the resolution of the survey-intersection inversion method.

Revisions in Progress

  • Would like to re-write the inversion functions to be as general as possible, i.e., if I pass scattering, absorption, particle size, and refractive index, it would solve for the wavelength.
  • Ablility to pass array objects directly to all functions (within reason).
  • Auto-graphing capabilities for sacttering functions.

Documentation To-Do List

  • More example scripts, I guess?
  • As a few function names and parameter names get updated, there may be some typos in old examples. I'll catch those as they crop up.

PyMieScatt To-Do List

  • Upload package to Anaconda cloud.

Publications Using PyMieScatt

If you use PyMieScatt in your research, please let me know and I'll link the publications here.

  • Sumlin BJ, Pandey A, Walker MJ, Pattison RS, Williams BJ, Chakrabarty RK. Atmospheric Photooxidation Diminishes Light Absorption by Primary Brown Carbon Aerosol from Biomass Burning. Environ Sci Tech Let. 2017 4 (12) 540-545 (Cover article). DOI: 10.1021/acs.estlett.7b00393
  • Sumlin BJ, Heinson WR, Chakrabarty RK. Retrieving the Aerosol Complex Refractive Index using PyMieScatt: A Mie Computational Package with Visualization Capabilities. J. Quant. Spectros. Rad. Trans. 2018 (205) 127-134. DOI: 10.1016/j.jqsrt.2017.10.012
  • Sumlin BJ, Heinson YW, Shetty N, Pandey A, Pattison RS, Baker S, Hao WM, Chakrabarty RK. UV-Vis-IR Spectral Complex Refractive Indices and Optical Properties of Brown Carbon Aerosol fro Biomass Burning. J. Quant. Spectros. Rad. Trans. 2018 (206) 392-398 DOI: 10.1016/j.jqsrt.2017.12.009
  • Sumlin BJ, Oxford C, Seo B, Pattison R, Williams B, Chakrabarty RK. Density and Homogeneous Internal Composition of Primary Brown Carbon Aerosol. Environ. Sci. Tech., In press. DOI: 10.1021/acs.est.8b00093

Author Contact Information

PyMieScatt was written by Benjamin Sumlin. Special thanks to Dr. William Heinson, Dr. Rajan Chakrabarty, Claire Fortenberry, and Apoorva Pandey for their insights and support.


.. toctree::
   :maxdepth: 2
   :caption: Table of Contents

   Documentation Home <index>
   Forward Functions for Homogeneous Spheres <forward>
   Forward Functions for Coated Spheres <forwardCS>
   Inverse Mie Functions for Homogeneous Spheres <inverse>
   General Usage tips and Example Scripts (constantly updating) <examples>
You can’t perform that action at this time.