:orphan:
.. _single_index:
Single Module
=============
The ``single`` package focuses on scattering from a single particle. It exposes
simple classes for defining a source, a scatterer and a detector so that the
interaction can be studied in detail.
Key components
--------------
- **Sources** - plane waves and Gaussian beams.
- **Scatterers** - spheres, cylinders and core--shell particles.
- **Detectors** - photodiodes as well as coherent and incoherent detectors.
Example
-------
This example computes the power coupled into a photodiode from a tiny sphere.
.. code-block:: python
from PyMieSim.single.scatterer import Sphere
from PyMieSim.single.source import Gaussian
from PyMieSim.single.detector import Photodiode
from PyMieSim.units import nanometer, degree, watt, AU, RIU
source = Gaussian(
wavelength=450 * nanometer,
polarization=0 * degree,
optical_power=1 * watt,
NA=0.3 * AU,
)
scatterer = Sphere(
diameter=6 * nanometer,
source=source,
medium_property=1.0 * RIU,
property=1.4 * RIU,
)
detector = Photodiode(
NA=0.1 * AU,
phi_offset=0 * degree,
gamma_offset=0 * degree,
sampling=200 * AU,
polarization_filter=None,
)
coupling = detector.coupling(scatterer)
print(coupling)
.. raw:: html
.. thumbnail-parent-div-open
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_farfield_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_farfield.py`
.. raw:: html
Far-Fields Computation and Visualization
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_footprint_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_footprint.py`
.. raw:: html
Scatterer Footprint Calculation and Visualization
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_nearfield_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_nearfield.py`
.. raw:: html
Near-Fields Computation and Visualization
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_s1s2_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_s1s2.py`
.. raw:: html
S1 S2 Function Computation
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_source_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_source.py`
.. raw:: html
Source Plottings
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_spf_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_spf.py`
.. raw:: html
SPF Computation
.. raw:: html
.. only:: html
.. image:: /gallery/single/images/thumb/sphx_glr_stokes_thumb.png
:alt:
:ref:`sphx_glr_gallery_single_stokes.py`
.. raw:: html
Stokes Parameters Computation
.. thumbnail-parent-div-close
.. raw:: html
.. toctree::
:hidden:
/gallery/single/farfield
/gallery/single/footprint
/gallery/single/nearfield
/gallery/single/s1s2
/gallery/single/source
/gallery/single/spf
/gallery/single/stokes
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_