Skip to content

Commit 5a418f1

Browse files
committed
allow calc_ang_scat() to take incident_vector argument
1 parent 6381e3a commit 5a418f1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pymie/mie.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
# User-facing functions for the most often calculated quantities (form factor,
5858
# efficiencies, asymmetry parameter)
5959

60-
def calc_ang_scat(m, x, thetas, kd=None, phis=None, check=False):
60+
def calc_ang_scat(m, x, thetas, kd=None, phis=None, incident_vector=None,
61+
check=False):
6162
"""
6263
Calculates the angular scattering of light intensity for parallel and
6364
perpendicular polarization for a sphere.
@@ -78,6 +79,9 @@ def calc_ang_scat(m, x, thetas, kd=None, phis=None, check=False):
7879
phis : None or ndarray
7980
azimuthal angles for which to calculate the diff scat intensity. If
8081
set, a cartesian basis is used
82+
incident_vector : 2-tuple (default None)
83+
If supplied, gives the polarization direction in the appropriate basis
84+
(cartesian if phis is set or scattering plane if not)
8185
check : Boolean (optional)
8286
if true, outputs scattering efficiencies
8387
@@ -94,7 +98,9 @@ def calc_ang_scat(m, x, thetas, kd=None, phis=None, check=False):
9498
cartesian = (phis is not None)
9599
return diff_scat_intensity_complex_medium(m, x, thetas, kd=kd,
96100
phis=phis,
97-
cartesian=cartesian)
101+
cartesian=cartesian,
102+
incident_vector =
103+
incident_vector)
98104

99105
# Mie scattering preliminaries
100106
nstop = _nstop(x.max())

0 commit comments

Comments
 (0)