.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/experiment/sphere/sphere_Qsca_vs_diameter.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_experiment_sphere_sphere_Qsca_vs_diameter.py: Sphere: Qsca vs diameter ======================== .. GENERATED FROM PYTHON SOURCE LINES 6-42 .. image-sg:: /gallery/experiment/sphere/images/sphx_glr_sphere_Qsca_vs_diameter_001.png :alt: sphere Qsca vs diameter :srcset: /gallery/experiment/sphere/images/sphx_glr_sphere_Qsca_vs_diameter_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none +-----------------------+-----------------------+ | Sellmeier Materials | Tabulated Materials | +=======================+=======================+ | water | nickel | +-----------------------+-----------------------+ | ZBLAN | sodium | +-----------------------+-----------------------+ | polystyren | zinc | +-----------------------+-----------------------+ | BK7 | test_tabulated_file | +-----------------------+-----------------------+ | BAK1 | tungsten | +-----------------------+-----------------------+ | polystyrene | copper | +-----------------------+-----------------------+ | fused_silica | silicon | +-----------------------+-----------------------+ | FK51A | lead | +-----------------------+-----------------------+ | acetone | tantalum | +-----------------------+-----------------------+ | SF11 | calcium | +-----------------------+-----------------------+ | cellulose | bismuth | +-----------------------+-----------------------+ | crown | polyetylene | +-----------------------+-----------------------+ | propanol | magnesium | +-----------------------+-----------------------+ | SF10 | rhodium | +-----------------------+-----------------------+ | LASF9 | silver | +-----------------------+-----------------------+ | ethylene | example_tabulated | +-----------------------+-----------------------+ | ethane | chromium | +-----------------------+-----------------------+ | pvc | titanium | +-----------------------+-----------------------+ | soda_lime_glass | pva | +-----------------------+-----------------------+ | methane | paladium | +-----------------------+-----------------------+ | polycarbonate | aluminium | +-----------------------+-----------------------+ | germanium | gold | +-----------------------+-----------------------+ | BAF10 | iron | +-----------------------+-----------------------+ | SF5 | vanadium | +-----------------------+-----------------------+ | acetylene | | +-----------------------+-----------------------+ | example_sellmeier | | +-----------------------+-----------------------+ | flint | | +-----------------------+-----------------------+ | lithium_niobate | | +-----------------------+-----------------------+ | air | | +-----------------------+-----------------------+ | argon | | +-----------------------+-----------------------+ | ethanol | | +-----------------------+-----------------------+ | glycerol | | +-----------------------+-----------------------+ | methanol | | +-----------------------+-----------------------+ | test_sellmeier_file | | +-----------------------+-----------------------+
| .. code-block:: Python import numpy as np from PyMieSim.units import ureg from PyMieSim.experiment.scatterer_set import SphereSet from PyMieSim.experiment.source_set import GaussianSet from PyMieSim.experiment.polarization_set import PolarizationSet from PyMieSim.experiment.material_set import MaterialSet, MediumSet from PyMieSim.experiment.setup import Setup from PyMieSim.material import print_available, SellmeierMaterial print_available() polarization_set = PolarizationSet( angles=[0.0] * ureg.degree, ) source = GaussianSet( wavelength=[405] * ureg.nanometer, polarization=polarization_set, optical_power=[1e-3] * ureg.watt, numerical_aperture=[0.2], ) polystyrene = SellmeierMaterial("polystyrene") scatterer = SphereSet( diameter=np.linspace(10, 1000, 150) * ureg.nanometer, material=MaterialSet([polystyrene]), medium=MediumSet([1.33, 1.34, 1.5]), ) experiment = Setup(scatterer_set=scatterer, source_set=source) dataframe = experiment.get("Qsca", scale_unit=True) dataframe.plot(x="scatterer:diameter", show=True) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.192 seconds) .. _sphx_glr_download_gallery_experiment_sphere_sphere_Qsca_vs_diameter.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: sphere_Qsca_vs_diameter.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: sphere_Qsca_vs_diameter.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: sphere_Qsca_vs_diameter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_