From dee2692b0f31058ea91f0283957e9fe9c13a9623 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 6 Jan 2019 01:10:49 +0100 Subject: [PATCH 1/2] Accounting for asDict, asCrossSection in MieQ() When the core shell system sent by the user is actually a single homogenous particle, MieQCoreShell() triggers MieQ() though without keeping the user's choice regarding asDict, asCrossSection which and set to False by default., These were thus added to the MieQ() so that it doesn't throw an error if the dict expected to be returned by MieQ when implemented receives a tuple. --- PyMieScatt/CoreShell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PyMieScatt/CoreShell.py b/PyMieScatt/CoreShell.py index 279a4f0..e4ed652 100644 --- a/PyMieScatt/CoreShell.py +++ b/PyMieScatt/CoreShell.py @@ -9,11 +9,11 @@ def MieQCoreShell(mCore,mShell,wavelength,dCore,dShell, asDict=False, asCrossSec xCore = np.pi*dCore/wavelength xShell = np.pi*dShell/wavelength if xCore==xShell: - return MieQ(mCore,wavelength,dShell) + return MieQ(mCore,wavelength,dShell, asDict, asCrossSection) elif xCore==0: - return MieQ(mShell,wavelength,dShell) + return MieQ(mShell,wavelength,dShell, asDict, asCrossSection) elif mCore==mShell: - return MieQ(mCore,wavelength,dShell) + return MieQ(mCore,wavelength,dShell, asDict, asCrossSection) elif xCore>0: nmax = np.round(2+xShell+4*(xShell**(1/3))) n = np.arange(1,nmax+1) From e765657a48b4ea686d2fd6eca90ee8109fef3cd6 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 6 Jan 2019 01:51:27 +0100 Subject: [PATCH 2/2] Update CoreShell.py --- PyMieScatt/CoreShell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PyMieScatt/CoreShell.py b/PyMieScatt/CoreShell.py index e4ed652..4b1c93a 100644 --- a/PyMieScatt/CoreShell.py +++ b/PyMieScatt/CoreShell.py @@ -9,11 +9,11 @@ def MieQCoreShell(mCore,mShell,wavelength,dCore,dShell, asDict=False, asCrossSec xCore = np.pi*dCore/wavelength xShell = np.pi*dShell/wavelength if xCore==xShell: - return MieQ(mCore,wavelength,dShell, asDict, asCrossSection) + return MieQ(mCore,wavelength,dShell, asDict=asDict, asCrossSection=asCrossSection) elif xCore==0: - return MieQ(mShell,wavelength,dShell, asDict, asCrossSection) + return MieQ(mShell,wavelength,dShell, asDict=asDict, asCrossSection=asCrossSection) elif mCore==mShell: - return MieQ(mCore,wavelength,dShell, asDict, asCrossSection) + return MieQ(mCore,wavelength,dShell, asDict=asDict, asCrossSection=asCrossSection) elif xCore>0: nmax = np.round(2+xShell+4*(xShell**(1/3))) n = np.arange(1,nmax+1)