Releases: scottprahl/miepython
3.0.2
3.0.2 5/25/2025)
- update version in both
__init__.py
andpyproject.toml
3.0.1 (5/25/2025)
- fix JIT regression (thanks @avgeiss)
- clarify polarization in docstrings
- improve README.rst
- fix git branches
- rename mie.mie_scalar to mie.single_sphere
- rename small_mie_sphere to small_sphere
- rename small_conducting_mie to small_conducting_sphere
- rationalize importing of jit and non-jit code
- add test_jit_speed.py and test_nojit_speed.py
Restored JIT functionality
3.0.1 (5/25/2025)
- fix JIT regression (thanks @avgeiss)
- clarify polarization in docstrings
- improve README.rst
- fix git branches
- rename mie.mie_scalar to mie.single_sphere
- rename small_mie_sphere to small_sphere
- rename small_conducting_mie to small_conducting_sphere
- rationalize importing of jit and non-jit code
- add test_jit_speed.py and test_nojit_speed.py
New, saner, api
This version improves the api: mie.efficiencies()
instead of mie.ez_mie()
to find the Mie efficiencies. The source code has been refactored so there is less redundancy between jitted and non-jitted code. Other changes include
- breaking api changes
- use core.py to cleanly separate jit and non-jit code
- new function to calculate mie coefficients inside sphere
- new function to calculate E-fields near and far from sphere (only validated in far-field)
- new rayleigh.py
- new vsh.py to calculate vector spherical harmonics
- new util.py for printing complex numbers
- new bessel.py for complete spherical bessel function support
- new monte_carlo.py to isolate Monte Carlo routines
- use black for python formatting
- update all notebooks to use new api
- add more tests
Add ability to get multipole information
2.5.5 (12/1/2024)
- add ability to get individual multipole intensities
- add 12_multipoles.ipynb as documentation
- improve github workflows
Better documentation for normalization options
Spring cleaning. Fixed a bunch of packaging details and improved the README.rst page.
Info about normalization options is available. For example, help(miepython.i_per) will now tell you
i_per(m, x, mu, norm='albedo')
Return the scattered intensity in a plane normal to the incident light.
This is the scattered intensity in a plane that is perpendicular to the
field of the incident plane wave. The intensity is normalized such
that the integral of the unpolarized intensity over 4π steradians
is equal to the single scattering albedo.
The normalization is controlled by `norm` and should be one of
['albedo', 'one', '4pi', 'qext', 'qsca', 'bohren', or 'wiscombe']
The normalization describes the integral of the scattering phase
function over all 4𝜋 steradians.
Args:
m: the complex index of refraction of the sphere
x: the size parameter of the sphere
mu: the angles, cos(theta), to calculate intensities
norm: (optional) string describing scattering function normalization
Returns:
The intensity at each angle in the array mu. Units [1/sr]
2.5.4 (5/7/2024)
- document normalization in docstrings
- add version and year to CITATION.cff
- remove 'v' from version numbers
- add github script and workflow to auto-update CITATION.cff
- add conda badge to readme
- clean up README.rst
- use svg images
- use a single tests/test_mie for jit and non-jit tests
- support ruff
- test python versions 3.7 to 3.12
- fix badges
- remove unused functions
- fix zenodo link
Full Changelog: v2.5.3...2.5.4
More conda packaging nonsense
v2.5.3 (8/5/2023)
- conda-forge fails because test files are not included
v2.5.0 (8/4/2023)
- fix scattering function for very small spheres
v2.4.0 (6/10/2023)
- add mie_phase_matrix() to calculate scattering (Mueller) matrix
Fix for small spheres
v2.5.0 (8/4/2023)
- fix scattering function for very small spheres (x=0.00064)
v2.4.0 (6/10/2023)
- add mie_phase_matrix() to calculate scattering (Mueller) matrix
Add scattering (Mueller) matrix
v2.4.0 (6/10/2023)
- add mie_phase_matrix() to calculate scattering (Mueller) matrix
v2.3.2
- fix typo in README.rst that prevented pypi upload
- add CITATION.cff to base level of miepython repository
v2.3.1
- add DOI for citation purposes
Citable Release
v2.3.2
- No code changes, but fixing metadata and adding CITATION.cff
v2.3.1
-
Using Zenodo to create archives that are citable. Zenodo is stored safely in CERN’s Data Center and operated by CERN. In any case, this creates a Digital Object Identifier (DOI) that is citable and trackable.
-
No code changes in this release.
User selectable phase function normalization
One of the pain points of working with Mie scattering functions is figuring out exactly how the phase function is normalized. miepython
defaults to normalizing the integral of the phase function over all directions to equal the albedo. This version now allows one to normalize to a range of common numbers:
- albedo : single scattering albedo
- one : unity
- 4pi : since there are 4π steradians in a sphere
- qsca : the scattering efficiency
- qext : the extinction efficiency
- bohren : 4π x² Qsca
- wiscombe : π x² Qsca
The normalization is done by specifying a different normalization
intensity = miepython.i_unpolarized(m, x, mu, norm='wiscombe')
See the normalization docs on https://miepython.readthedocs.io/en/latest/03a_normalization.html for details