Skip to main content
Ctrl+K

PyMieSim

  • Theoretical Background
  • Coding examples
  • Validation Module
  • API Reference
  • References
  • PyPI
  • Anaconda
  • Theoretical Background
  • Coding examples
  • Validation Module
  • API Reference
  • References
  • PyPI
  • Anaconda

Section Navigation

  • Single Module
    • Detectors
      • Hermite-Gauss 01 Mode Detector
      • Hermite-Gauss 31 Mode Detector
      • Laguerre-Gauss 2-3 Mode Detector
      • LP01 Mode Detector
      • LP02 Mode Detector
      • LP11 Mode Detector
      • Integrating sphere
      • Photodiode Detector
    • Scatterers
      • Far-Fields Computation and Visualization
      • Scatterer Footprint Calculation and Visualization
      • Print properties
      • S1 S2 Function Computation
      • Source Plottings
      • SPF Computation
      • Stokes Parameters Computation
  • Experiment Module
    • Core-Shell
      • CoreShell: Qback vs Core Diameter
      • CoreShell: An vs Core Diameter
      • CoreShell: B1 vs Core Diameter
      • CoreShell: Coupling vs Diameter
      • CoreShell: Coupling vs Diameter
    • Cylinder
      • Cylinder: Qabs vs Diameter
      • Cylinder: Qsca vs Diameter
      • Cylinder: Qsca vs Index
      • Cylinder: Qsca vs Wavelength
      • Cylinder: Qsca vs wavelength std
      • Cylinder: A1 Scattering Coefficient
      • Cylinder: B1 Scattering Coefficient
      • Cylinder: Coupling vs Diameter
      • Cylinder: Goniometer
      • Cylinder: Coupling vs Wavelength
    • Sphere
      • Sphere: Qabs vs diameter
      • Sphere: Qsca vs diameter
      • Sphere: Qsca vs index
      • Sphere: Qsca vs wavelength
      • Sphere: Qsca vs wavelength STD
      • Sphere: A1 scattering coefficient
      • Sphere: B1 scattering coefficient
      • Sphere: Coherent Goniometer
      • Sphere: Coherent mode field rotation
      • Sphere: coherent coupling vs sampling
      • Sphere: Coupling vs diameter
      • Sphere: Coupling vs polarization filter
      • Sphere: Goniometer
      • Sphere: Coupling vs sampling
      • Sphere: Coupling vs wavelength
  • Extras Examples
    • Samples Properties
    • Scattering efficiency of a sphere
    • Coupling heatmap of a sphere
    • Sphere: Coupling vs numerical aperture
    • Plot system
  • Coding examples
  • Single Module
  • Scatterers
  • Print properties

Note

Go to the end to download the full example code.

Print properties#

This example demonstrates the computation of scattering properties using PyMieSim.

Importing the package: PyMieSim

from PyMieSim.single.scatterer import Cylinder
from PyMieSim.single.source import Gaussian
from PyMieSim.units import nanometer, degree, watt, AU, RIU
from PyOptik import Material

Defining the source

source = Gaussian(
    wavelength=750 * nanometer,  # 750 nm
    polarization=30 * degree,  # Right circular polarization
    optical_power=1 * watt,  # Power in watt
    NA=0.3 * AU  # Numerical Aperture
)

Defining the scatterer

scatterer = Cylinder(
    diameter=300 * nanometer,  # 300 nm
    source=source,
    property=(1.4 + 0.1j) * RIU,
    medium_property=Material.water
)

scatterer.print_properties()
Property        Value
--------------  ----------------------
size_parameter  1.6708234364769365
cross_section   300000.00000000006 µm²
g               0.6122911844808381
Qsca            0.03994317700025258
Qext            0.31158414826330205
Qabs            0.2716409712630495
Csca            11982.953100075776 µm²
Cext            93475.24447899064 µm²
Cabs            81492.29137891486 µm²

Total running time of the script: (0 minutes 0.056 seconds)

Download Jupyter notebook: properties.ipynb

Download Python source code: properties.py

Download zipped: properties.zip

Gallery generated by Sphinx-Gallery

This Page

  • Show Source

© Copyright 2024, Martin Poinsinet de Sivry-Houle.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.16.1.