Skip to content

Commit

Permalink
1.7.5.1 upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bsumlin committed May 1, 2020
1 parent 954ad17 commit 8f115d5
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions PyMieScatt.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: PyMieScatt
Version: 1.7.4
Version: 1.7.5.1
Summary: A collection of forward and inverse Mie solving routines based on Bohren and Huffman's Mie Theory derivations.
Home-page: http://air.eece.wustl.edu/people/ben-sumlin/
Author: Benjamin Sumlin
Author-email: bsumlin@wustl.edu
License: MIT
Description: 1.7.4 - See `documentation <http://pymiescatt.readthedocs.io/>`_ for update notes.
Description: 1.7.5.1 - See `documentation <http://pymiescatt.readthedocs.io/>`_ for update notes.
Keywords: Mie Rayleigh scattering absorption extinction light refraction
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Expand Down
1 change: 1 addition & 0 deletions PyMieScatt.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
LICENSE.md
README.md
setup.cfg
setup.py
Expand Down
3 changes: 0 additions & 3 deletions PyMieScatt/Inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,6 @@ def ContourIntersection(Qsca,Qabs,wavelength,diameter,Qback=None,n=None,k=None,n

def ContourIntersection_SD(Bsca,Babs,wavelength,dp,ndp,n=None,k=None,nMin=1,nMax=3,kMin=0.00001,kMax=1,Bback=None,gridPoints=60,interpolationFactor=2,maxError=0.005,fig=None,ax=None,axisOption=0):
# http://pymiescatt.readthedocs.io/en/latest/inverse.html#ContourIntersection_SD
# See discussion on documentation site for the following lines, where B needs to be scaled for correct units
Bsca *= 1e6
Babs *= 1e6
if Bback is not None:
Bback *= 1e6
if (type(Babs) == np.float64 and Babs == 0.0) or (type(Babs) in [list, tuple, np.ndarray] and Babs[0]==0):
Expand Down
2 changes: 1 addition & 1 deletion PyMieScatt/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.7.5"
__version__ = "1.7.5.1"
4 changes: 3 additions & 1 deletion build/lib/PyMieScatt/Inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def ContourIntersection(Qsca,Qabs,wavelength,diameter,Qback=None,n=None,k=None,n

def ContourIntersection_SD(Bsca,Babs,wavelength,dp,ndp,n=None,k=None,nMin=1,nMax=3,kMin=0.00001,kMax=1,Bback=None,gridPoints=60,interpolationFactor=2,maxError=0.005,fig=None,ax=None,axisOption=0):
# http://pymiescatt.readthedocs.io/en/latest/inverse.html#ContourIntersection_SD
if Bback is not None:
Bback *= 1e6
if (type(Babs) == np.float64 and Babs == 0.0) or (type(Babs) in [list, tuple, np.ndarray] and Babs[0]==0):
k = 0.0
if k == 0.0:
Expand Down Expand Up @@ -825,4 +827,4 @@ def fastMieQ(m, wavelength, diameter):
qsca = (2/x2)*np.sum(n1*(an.real**2+an.imag**2+bn.real**2+bn.imag**2))
qback = (1/x2)*(np.abs(np.sum(n1*((-1)**n)*(an-bn)))**2)
qabs = qext-qsca
return qsca, qabs, qback
return qsca, qabs, qback
12 changes: 6 additions & 6 deletions build/lib/PyMieScatt/Mie.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ def RayleighMieQ(m, wavelength, diameter, nMedium=1.0, asDict=False, asCrossSect
def AutoMieQ(m, wavelength, diameter, nMedium=1.0, crossover=0.01, asDict=False, asCrossSection=False):
# http://pymiescatt.readthedocs.io/en/latest/forward.html#AutoMieQ
nMedium = nMedium.real
m /= nMedium
wavelength /= nMedium
x = np.pi*diameter/wavelength
if x==0:
m_eff = m / nMedium
wavelength_eff = wavelength / nMedium
x_eff = np.pi*diameter/wavelength_eff
if x_eff==0:
return 0, 0, 0, 1.5, 0, 0, 0
elif x<crossover:
elif x_eff<crossover:
return RayleighMieQ(m, wavelength, diameter, nMedium, asDict=asDict, asCrossSection=asCrossSection)
else:
return MieQ(m, wavelength, diameter, nMedium, asDict=asDict, asCrossSection=asCrossSection)
Expand Down Expand Up @@ -526,4 +526,4 @@ def Mie_Lognormal(m,wavelength,geoStdDev,geoMean,numberOfParticles,nMedium=1.0,
if asDict==True:
return dict(Bext=Bext, Bsca=Bsca, Babs=Babs, bigG=bigG, Bpr=Bpr, Bback=Bback, Bratio=Bratio)
else:
return Bext, Bsca, Babs, bigG, Bpr, Bback, Bratio
return Bext, Bsca, Babs, bigG, Bpr, Bback, Bratio
2 changes: 1 addition & 1 deletion build/lib/PyMieScatt/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.7.4"
__version__ = "1.7.5.1"
Binary file added dist/PyMieScatt-1.7.5.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/PyMieScatt-1.7.5.1.tar.gz
Binary file not shown.
12 changes: 8 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Install PyMieScatt

NOTE: You must install `Shapely <https://shapely.readthedocs.io/>`_ first, preferably from GitHub. Users have reported difficulty installing it with pip. Conda works, too.

The current version is 1.7.5. You can install PyMieScatt from `The Python Package Index (PyPI) <https://pypi.python.org/pypi/PyMieScatt>`_ with ::
The current version is 1.7.6. You can install PyMieScatt from `The Python Package Index (PyPI) <https://pypi.python.org/pypi/PyMieScatt>`_ with ::

$ pip install PyMieScatt

Expand All @@ -28,15 +28,19 @@ or from `GitHub <https://github.com/bsumlin/PyMieScatt>`_. Clone the repository

$ python setup.py install

Revision Notes - version 1.7.5 (23 February, 2020)
Revision Notes - version 1.7.6 (32 April, 2020)
------------------------------------------------------------------------------

- Fixed :py:func:`AutoMieQ` per discussions with Gerard van Ewijk. In the case of nMedium!=1, :py:func:`AutoMieQ` was calculating effective n and wavelength, and then passing those parameters to the relevant Mie function. Those functions then re-calculated the effective n and wavelength, leading to errors.
- Fixed :py:func:`ContourIntersection_SD` per discussions with Hans Moosmuller. The inputs should now correctly scale for units of Mm-1.
- Still debugging :py:func:`ContourIntersection_SD` per discussions with Professor Moosmuller. I recommend examining the source code if you have any questions.

Revision History
----------------

- 1.7.5 (23 February, 2020)

- Fixed :py:func:`AutoMieQ` per discussions with Gerard van Ewijk. In the case of nMedium!=1, :py:func:`AutoMieQ` was calculating effective n and wavelength, and then passing those parameters to the relevant Mie function. Those functions then re-calculated the effective n and wavelength, leading to errors.
- Fixed :py:func:`ContourIntersection_SD` per discussions with Hans Moosmuller. The inputs should now correctly scale for units of Mm-1.

- 1.7.4 (6 May, 2019)

- Fixed :py:func:`ScatteringFunction` per discussions with @zcm73400 on GitHub. View the pull request for more info.
Expand Down

0 comments on commit 8f115d5

Please sign in to comment.