Skip to content

Commit

Permalink
1.4.3
Browse files Browse the repository at this point in the history
Fixed a bug in contour intersection stuff
  • Loading branch information
bsumlin committed Feb 21, 2018
1 parent d7fcf32 commit 6252e5a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions PyMieScatt.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Metadata-Version: 1.1
Name: PyMieScatt
Version: 1.4.2
Version: 1.4.3
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: GPL
Description-Content-Type: UNKNOWN
Description: 1.4.2 - Added error bounds as an option for the graphical inversion method. Added new automatic inversion methods Inversion() and Inversion_SD(). Significantly improved the iterative methods.
Description: 1.4.3 - Added error bounds as an option for the graphical inversion method. Added new automatic inversion methods Inversion() and Inversion_SD(). Significantly improved the iterative methods.
Docs are hosted at `ReadTheDocs <http://pymiescatt.readthedocs.io/>`_.
Keywords: Mie Rayleigh scattering absorption extinction light refraction
Platform: UNKNOWN
Expand Down
17 changes: 9 additions & 8 deletions PyMieScatt/Inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,16 @@ def find_intersections(A,B):
for p2 in B.collections[0].get_paths():
v1 = p1.vertices
v2 = p2.vertices

poly1 = geometry.LineString(v1)
poly2 = geometry.LineString(v2)

sol = poly1.intersection(poly2)

for s in sol:
X.append(s.x)
Y.append(s.y)
try:
poly1 = geometry.LineString(v1)
poly2 = geometry.LineString(v2)
sol = poly1.intersection(poly2)
for s in sol:
X.append(s.x)
Y.append(s.y)
except:
pass

return X,Y

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.4.2"
__version__ = "1.4.3"
17 changes: 9 additions & 8 deletions build/lib/PyMieScatt/Inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,16 @@ def find_intersections(A,B):
for p2 in B.collections[0].get_paths():
v1 = p1.vertices
v2 = p2.vertices

poly1 = geometry.LineString(v1)
poly2 = geometry.LineString(v2)

sol = poly1.intersection(poly2)

for s in sol:
X.append(s.x)
Y.append(s.y)
try:
poly1 = geometry.LineString(v1)
poly2 = geometry.LineString(v2)
sol = poly1.intersection(poly2)
for s in sol:
X.append(s.x)
Y.append(s.y)
except:
pass

return X,Y

Expand Down
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.4.2"
__version__ = "1.4.3"
Binary file removed dist/PyMieScatt-1.4.2-py3-none-any.whl
Binary file not shown.
Binary file removed dist/PyMieScatt-1.4.2.tar.gz
Binary file not shown.
Binary file added dist/PyMieScatt-1.4.3-py3-none-any.whl
Binary file not shown.
Binary file added dist/PyMieScatt-1.4.3.tar.gz
Binary file not shown.
10 changes: 7 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Documentation is currently under development, but almost complete. A manuscript
Install PyMieScatt
------------------

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

$ pip install PyMieScatt

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

$ python setup.py install

Revision Notes - version 1.4.2 (25 January, 2018)
Revision Notes - version 1.4.3 (21 February, 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 <https://github.com/JohnKendrick/PDielec>`_ for the suggestion.
- Fixed a small bug in :py:func:`ContourIntersection` and :py:func:`ContourIntersection_SD` that would produce an error if no intersections were detected. Now it just throws a warning. I'll update soon to have better reporting.

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

- 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 <https://github.com/JohnKendrick/PDielec>`_ for the suggestion.

- 1.4.1 (25 January, 2018)

- Added `Shapely <https://shapely.readthedocs.io/>`_ 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.
Expand Down

0 comments on commit 6252e5a

Please sign in to comment.