Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bsumlin committed Jul 24, 2017
1 parent 5ac1932 commit 0ed62ef
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions index.rst/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ You can install PyMieScatt from `PyPI <https://pypi.python.org/pypi/PyMieScatt>`
Theory <Theory>
Functions <Function>
Examples <Examples>

Functions for homogeneous spheres
---------------------------------

.. py:function:: MieQ(m, wavelength, diameter[, asDict=False])
Expand All @@ -36,23 +39,39 @@ You can install PyMieScatt from `PyPI <https://pypi.python.org/pypi/PyMieScatt>`

:math:`Q_{back}=\frac{1}{x^2}\left|\sum_{n=1}^{n_{max}}(2n+1)(-1)^n(a_n-b_n)\right|^2`

:math:`Q_{ratio}=\frac{Q_{back}}{Q_{sca}}`

:math:`g=\frac{4}{Q_{sca}x^2}\left[\sum_{n=1}^{n_{max}}\frac{n(n+2)}{n+1}\text{Re}\left\{a_n a_{n+1}^*+b_n b_{n+1}^*\right\}+\sum_{n=1}^{n_{max}}\frac{2n+1}{n(n+1)}\text{Re}\left\{a_n b_n^*\right\}\right]`

:math:`Q_{pr}=Q_{ext}-gQ_{sca}`

where asterisks denote the complex conjugates. For example, compute the Mie efficencies of a particle 300 nm in diameter with m=1.77+0.63i, illuminated by :math:`\lambda` = 375 nm: ::
>>> import PyMieScatt as ps
>>> ps.MieQ(1.77+0.63j,375,300,asDict=True)
{'Qext': 2.8584971991564112,
'Qsca': 1.3149276685170939,
'Qabs': 1.5435695306393173,
'g': 0.7251162362148782,
'Qpr': 1.9050217972664911,
'Qback': 0.20145510481352547,
'Qratio': 0.15320622543498222}

.. py:Function:: Mie_ab(m,x)
Returns external field coefficients :math:`a_n` and :math:`b_n` based on inputs of *m* and :math:`x=\pi\,d_p/\lambda`. Typically not available as a top level call but can be specifically imported via ::
Returns external field coefficients :math:`a_n` and :math:`b_n` based on inputs of *m* and :math:`x=\frac{\pi\,d_p}{\lambda}`. Typically not available as a top level call but can be specifically imported via ::

$ from PyMieScatt import Mie_ab

.. py:Function:: Mie_cd(m,x)
Returns internal field coefficients :math:`c_n` and :math:`d_n` based on inputs of *m* and :math:`x=\pi\,d_p/\lambda`. Typically not available as a top level call but can be specifically imported via ::
Returns internal field coefficients :math:`c_n` and :math:`d_n` based on inputs of *m* and :math:`x=\frac{\pi\,d_p}{\lambda}`. Typically not available as a top level call but can be specifically imported via ::

$ from PyMieScatt import Mie_cd

.. py:Function:: RayleighMieQ(m, wavelength, diameter[, asDict=False])
Returns Mie efficencies of a spherical particle in the Rayleigh regime (:math:`x=\pi\,d_p/\lambda << 1`) given refractive index *m*, *wavelength*, and *diameter*. Optionally returns the parameters as a dict when *asDict* is specified and set to True. Uses Rayleigh-regime approximations:
Returns Mie efficencies of a spherical particle in the Rayleigh regime (:math:`x=\frac{\pi\,d_p}{\lambda} \ll 1`) given refractive index *m*, *wavelength*, and *diameter*. Optionally returns the parameters as a dict when *asDict* is specified and set to True. Uses Rayleigh-regime approximations:

:math:`Q_{sca}=\frac{8x^4}{3}\left|{\frac{m^2-1}{m^2+2}}\right|^2`

Expand All @@ -72,7 +91,7 @@ You can install PyMieScatt from `PyPI <https://pypi.python.org/pypi/PyMieScatt>`

.. py:Function:: LowFrequencyMie_ab(m,x)
Returns external field coefficients :math:`a_n` and :math:`b_n` based on inputs of *m* and :math:`x=\pi\,d_p/\lambda` by limiting the expansion of :math:`a_n` and :math:`b_n` to second order:
Returns external field coefficients :math:`a_n` and :math:`b_n` based on inputs of *m* and :math:`x=\frac{\pi\,d_p}{\lambda}` by limiting the expansion of :math:`a_n` and :math:`b_n` to second order:

:math:`a_1=-\frac{i2x^3}{3}\frac{(m^2-1)}{m^2+2}`

Expand All @@ -81,3 +100,20 @@ You can install PyMieScatt from `PyPI <https://pypi.python.org/pypi/PyMieScatt>`
:math:`b_1=-\frac{ix^5}{45}(m^2-1)`

:math:`b_2=0`

Functions for polydisperse size distributions of homogeneous spheres
--------------------------------------------------------------------

When an efficency *Q* is integrated over a size distribution :math:`n_d(d_p)`, the result is the *coefficient* :math:`\beta`, which carries units of inverse length. The general form is:

:math:`\beta=\int\limits_{0}^{\infty}\frac{\pi d_p^2}{4}Q(m,\lambda,d_p)n_d(d_p)(10^{-6})dd_p`

where :math:`d_p` is the diameter of the particle (in nm), :math:`n_d(d_p)` is the number of particles of diameter :math:`d_p` (per cubic centimeter), and the factor :math:`10^{-6}` is used to cast the result in units of :math:`\text{Mm^{-1}}`.

The bulk asymmetry parameter *G* is calculated by:

:math:`G=\frac{\int g(d_p)\beta_{sca}(d_p)dd_p}{\int \beta_{sca}(d_p)dd_p}`

.. py:Function::`MieQ_withSizeDistribution(m, wavelength, sizeDistributionDiameterBins, sizeDistribution[, asDict=False])
Returns Mie coefficients :math:`\beta_{ext}`, :math:`\beta_{sca}`, :math:`\beta_{abs}`, :math:`G`, :math:`\beta_{pr}`, :math:`\beta_{back}`, and :math:`\beta_{ratio}`.

0 comments on commit 0ed62ef

Please sign in to comment.