.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/extras/SphereProperties.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_extras_SphereProperties.py: Samples Properties ================== .. GENERATED FROM PYTHON SOURCE LINES 5-50 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/extras/images/sphx_glr_SphereProperties_001.png :alt: SphereProperties :srcset: /gallery/extras/images/sphx_glr_SphereProperties_001.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/extras/images/sphx_glr_SphereProperties_002.png :alt: SphereProperties :srcset: /gallery/extras/images/sphx_glr_SphereProperties_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none Property Value -------------- ---------------------- size_parameter 2.513274122871834 area 502654.8245743669 nm² g 0.6960064419371798 Qsca 1.7376473038362097 Qext 1.7376473038362097 Qabs 0.0 Qback 0.35502029214192654 Qratio 0.2043109043809679 Qpr 0.5282335865514358 Csca 873436.8006819116 nm² Cext 873436.8006819116 nm² Cabs 0.0 m² Cback 178452.66266694057 nm² Cratio 102697.86180024568 nm² Cpr 265519.16078230063 nm² | .. code-block:: Python from PyMieSim.single.scatterer import Sphere from PyMieSim.single.source import Gaussian from PyMieSim.units import degree, nanometer, AU, RIU, watt source = Gaussian( wavelength=1000 * nanometer, polarization=0 * degree, optical_power=1 * watt, NA=0.3 * AU ) source.plot() scatterer = Sphere( diameter=800 * nanometer, source=source, property=1.4 * RIU, medium_property=1.0 * RIU ) farfield = scatterer.get_far_field(sampling=300) farfield.plot() scatterer.print_properties() # Property Value # -------------- ---------------------- # size_parameter 2.513274122871834 # area 502654.8245743669 nm² # g 0.6960064419371799 # Qsca 1.7376473038362086 # Qext 1.7376473038362086 # Qabs 0.0 # Qback 0.3550202921419265 # Qratio 0.20431090438096802 # Qpr 0.5282335865514354 # Csca 873436.800681911 nm² # Cext 873436.800681911 nm² # Cabs 0.0 m² # Cback 178452.66266694054 nm² # Cratio 102697.86180024572 nm² # Cpr 265519.1607823004 nm² .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.195 seconds) .. _sphx_glr_download_gallery_extras_SphereProperties.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: SphereProperties.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: SphereProperties.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: SphereProperties.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_