bsumlin / PyMieScatt

A collection of forward and inverse Mie solving routines for Python 3, based on Bohren and Huffman's Mie Theory derivations
http://pymiescatt.readthedocs.io/en/latest/
MIT License
99 stars 38 forks source link

Resolving a problem that seems to be associated with the introduction… #20

Open JohnKendrick opened 2 years ago

JohnKendrick commented 2 years ago

… of AutoMie_ab into the MieS1S2 routine.

Looking at the code for AutoMie_ab there is a hard crossover and this seems to have introduced the problem.

There is also a check for a crossover in both MieQ and AutoMieQ which could cause a conflict.

I have introduced a module wide variable called crossover and given it a value of 0.01. I have removed the crossover parameter from the AutoMieQ function call. I now use the module wide parameter to test for crossover in AutoMieQ and AutoMie_ab I have removed the crossover check in MieQ and left the full Mie expansion.

The user is now able to change the crossover value him or herself.

import PyMieScatt.Mie as Mie Mie.crossover = 0.001

This allows the use some control over the crossover if they are unhappy with the default setting.