Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
docs
  • Loading branch information
bsumlin committed Mar 9, 2018
1 parent 8161185 commit f4e0841
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
40 changes: 32 additions & 8 deletions docs/forward.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Functions for Forward Mie Calculations of Homogeneous Spheres
Functions for single particles
---------------------------------

.. py:function:: MieQ(m, wavelength, diameter[, asDict=False])
.. py:function:: MieQ(m, wavelength, diameter[, asDict=False, asCrossSection=False])
Computes Mie efficencies *Q* and asymmetry parameter *g* of a single, homogeneous particle. Uses :py:func:`Mie_ab` to calculate :math:`a_n` and :math:`b_n`, and then calculates *Q* via:

Expand Down Expand Up @@ -35,14 +35,20 @@ Functions for single particles
The diameter of the particle, in nanometers.
asDict : bool, optional
If specified and set to True, returns the results as a dict.
asCrossSection : bool, optional
If specified and set to True, returns the results as optical cross-sections with units of nm\ :sup:`2`.

**Returns**


qext, qsca, qabs, g, qpr, qback, qratio : float
The Mie efficencies described above.
cext, csca, cabs, g, cpr, cback, cratio : float
If asCrossSection==True, :py:func:`MieQ` returns optical cross-sections.
q : dict
If asDict==True, :py:func:`MieQ` returns a dict of the above values with appropriate keys.
If asDict==True, :py:func:`MieQ` returns a dict of the above efficiencies with appropriate keys.
c : dict
If asDict==True and asCrossSection==True, returns a dict of the above cross-sections with appropriate keys.

For example, compute the Mie efficencies of a particle 300 nm in diameter with m = 1.77+0.63i, illuminated by λ = 375 nm: ::
Expand Down Expand Up @@ -96,7 +102,7 @@ Functions for single particles
cn, dn : numpy.ndarray
Arrays of size n\ :sub:`max` = 2+x+4x\ :sup:`1/3`

.. py:Function:: RayleighMieQ(m, wavelength, diameter[, asDict=False])
.. py:Function:: RayleighMieQ(m, wavelength, diameter[, asDict=False, asCrossSection=False])
Computes Mie efficencies of a spherical particle in the Rayleigh regime (:math:`x=\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:

Expand All @@ -123,14 +129,20 @@ Functions for single particles
The diameter of the particle, in nanometers.
asDict : bool, optional
If specified and set to True, returns the results as a dict.
asCrossSection : bool, optional
If specified and set to True, returns the results as optical cross-sections with units of nm\ :sup:`2`.

**Returns**


qext, qsca, qabs, g, qpr, qback, qratio : float
The Mie efficencies described above.
cext, csca, cabs, g, cpr, cback, cratio : float
If asCrossSection==True, :py:func:`RayleighMieQ` returns optical cross-sections.
q : dict
If asDict==True, :py:func:`RayleighMieQ` returns a dict of the above values with appropriate keys.
If asDict==True, :py:func:`RayleighMieQ` returns a dict of the above efficiencies with appropriate keys.
c : dict
If asDict==True and asCrossSection==True, returns a dict of the above cross-sections with appropriate keys.

For example, compute the Mie efficencies of a particle 50 nm in diameter with m = 1.33+0.01i, illuminated by λ = 870 nm: ::
Expand All @@ -145,7 +157,7 @@ Functions for single particles
'g': 0}


.. py:Function:: AutoMieQ(m, wavelength, diameter[, crossover=0.01, asDict=False])
.. py:Function:: AutoMieQ(m, wavelength, diameter[, crossover=0.01, asDict=False, asCrossSection=False])
Returns Mie efficencies of a spherical particle according to either :py:func:`MieQ` or :py:func:`RayleighMieQ` depending on the magnitude of the size parameter. Good for studying parameter ranges or size distributions. Thanks to `John Kendrick <https://github.com/JohnKendrick/PDielec>`_ for discussions about where to best place the crossover point.

Expand All @@ -161,17 +173,23 @@ Functions for single particles
The size parameter that dictates where calculations switch from Rayleigh approximation to actual Mie.
asDict : bool, optional
If specified and set to True, returns the results as a dict.
asCrossSection : bool, optional
If specified and set to True, returns the results as optical cross-sections with units of nm\ :sup:`2`.

**Returns**


qext, qsca, qabs, g, qpr, qback, qratio : float
The Mie efficencies described above.
cext, csca, cabs, g, cpr, cback, cratio : float
If asCrossSection==True, :py:func:`AutoMieQ` returns optical cross-sections.
q : dict
If asDict==True, :py:func:`RayleighMieQ` returns a dict of the above values with appropriate keys.
If asDict==True, :py:func:`AutoMieQ` returns a dict of the above efficiencies with appropriate keys.
c : dict
If asDict==True and asCrossSection==True, returns a dict of the above cross-sections with appropriate keys.


.. py:Function:: LowFrequencyMieQ(m, wavelength, diameter[, asDict=False])
.. py:Function:: LowFrequencyMieQ(m, wavelength, diameter[, asDict=False, asCrossSection=False])
Returns Mie efficencies of a spherical particle in the low-frequency regime (:math:`x=\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 :py:func:`LowFrequencyMie_ab` to calculate a\ :sub:`n` and b\ :sub:`n`, and follows the same math as :py:func:`MieQ`.

Expand All @@ -186,14 +204,20 @@ Functions for single particles
The diameter of the particle, in nanometers.
asDict : bool, optional
If specified and set to True, returns the results as a dict.
asCrossSection : bool, optional
If specified and set to True, returns the results as optical cross-sections with units of nm\ :sup:`2`.

**Returns**


qext, qsca, qabs, g, qpr, qback, qratio : float
The Mie efficencies described above.
cext, csca, cabs, g, cpr, cback, cratio : float
If asCrossSection==True, :py:func:`LowFrequencyMieQ` returns optical cross-sections.
q : dict
If asDict==True, :py:func:`RayleighMieQ` returns a dict of the above values with appropriate keys.
If asDict==True, :py:func:`LowFrequencyMieQ` returns a dict of the above efficiencies with appropriate keys.
c : dict
If asDict==True and asCrossSection==True, returns a dict of the above cross-sections with appropriate keys.

For example, compute the Mie efficencies of a particle 100 nm in diameter with m = 1.33+0.01i, illuminated by λ = 1600 nm: ::
Expand Down
10 changes: 8 additions & 2 deletions docs/forwardCS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Functions for Coated Spheres (Core-Shell Particles)
===================================================

.. py:Function:: MieQCoreShell(mCore, mShell, wavelength, dCore, dShell[, asDict=False])
.. py:Function:: MieQCoreShell(mCore, mShell, wavelength, dCore, dShell[, asDict=False, asCrossSection=False])
Compute Mie efficencies *Q* and asymmetry parameter *g* of a single, coated particle. Uses :py:func:`CoreShell_ab` to calculate a\ :sub:`n` and b\ :sub:`n` , and then calculates Q\ :sub:`i` following closely from the original BHMIE.

Expand All @@ -20,14 +20,20 @@ Functions for Coated Spheres (Core-Shell Particles)
The diameter of the shell, in nanomaters. This is equal to the total diameter of the particle.
asDict : bool, optional
If True, returns the results as a dict.
asCrossSection : bool, optional
If specified and set to True, returns the results as optical cross-sections with units of nm\ :sup:`2`.

**Returns**


qext, qsca, qabs, g, qpr, qback, qratio : float
The Mie efficencies described above.
cext, csca, cabs, g, cpr, cback, cratio : float
If asCrossSection==True, :py:func:`MieQCoreShell` returns optical cross-sections.
q : dict
If asDict==True, :py:func:`MieQCoreShell` returns a dict of the above values with appropriate keys.
If asDict==True, :py:func:`MieQCoreShell` returns a dict of the above efficiencies with appropriate keys.
c : dict
If asDict==True and asCrossSection==True, returns a dict of the above cross-sections with appropriate keys.

**Considerations**

Expand Down

0 comments on commit f4e0841

Please sign in to comment.