Skip to main content
Ctrl+K

PyMieSim

  • Theory
  • Getting started in 10 minutes
  • Workflows
  • Measure reference
  • Performance and scaling
    • Troubleshooting
    • Reproducible studies
    • Compatibility matrix
    • Coding examples
    • Validation Examples
    • API Reference
    • References
  • PyPI
  • Anaconda
  • Theory
  • Getting started in 10 minutes
  • Workflows
  • Measure reference
  • Performance and scaling
  • Troubleshooting
  • Reproducible studies
  • Compatibility matrix
  • Coding examples
  • Validation Examples
  • API Reference
  • References
  • PyPI
  • Anaconda

Section Navigation

  • Single Module
    • Coupling
    • Far-Fields Computation and Visualization
    • Scatterer Footprint Calculation and Visualization
    • Near-Field Computation and Visualization
    • Far-Fields Computation and Visualization
    • S1 S2 Function Computation
    • SPF Computation
    • Stokes Parameters Computation
  • Experiment Module
    • Core-Shell
      • CoreShell: Qback vs Core Diameter
      • CoreShell: Coupling vs Diameter
      • CoreShell: Coupling vs Diameter
    • Cylinder
      • InfiniteCylinder: Qabs vs Diameter
      • InfiniteCylinder: Qsca vs Diameter
      • InfiniteCylinder: Qsca vs Index
      • InfiniteCylinder: Qsca vs Wavelength
      • InfiniteCylinder: Qsca vs wavelength std
      • InfiniteCylinder: Coupling vs Diameter
      • InfiniteCylinder: Goniometer
      • InfiniteCylinder: 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: 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
  • Benchmarks
    • Memory scaling with sweep size
    • Parameter-grid scaling
    • Reproducible parameter-sweep benchmark
    • Runtime scaling with sweep size
  • Extra Examples
    • 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
    • Scattering efficiency of a sphere
    • Array-based scattering calculations
    • Coupling heatmap of a sphere
    • Sphere: Coupling vs numerical aperture
    • Experiment Photodiode Angular Weights
    • Integrating sphere
    • Photodiode Detector
    • Photodiode Angular Weights
    • Plot system
    • Print properties
    • Samples Properties
  • Validation Examples
    • Energy-conservation validation
    • Bohren & Huffmann
      • InfiniteCylinder Scatterer Bohren-Huffman figure 8.10
      • InfiniteCylinder Scatterer Bohren-Huffman figure 8.7
      • InfiniteCylinder Scatterer Bohren-Huffman figure 8.8
    • Internal
      • Effect of Shell dimensions in equivalent medium
      • Goniometric Coupling vs S1 S2 Comparison
    • PyMieScatt
      • Core-Shell Particles: 0
      • Core-Shell Particles: 1
      • Sphere Particles: 0
      • Sphere Particles: 1
  • Coding examples
  • Extra Examples
  • 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.

from PyMieSim import (
    ureg,
    InfiniteCylinder,
    Gaussian,
    PolarizationState,
)

polarization_state = PolarizationState(angle=30 * ureg.degree)

source = Gaussian(
    wavelength=750 * ureg.nanometer,
    polarization=polarization_state,
    optical_power=1 * ureg.watt,
    numerical_aperture=0.3,
)

scatterer = InfiniteCylinder(
    diameter=300 * ureg.nanometer,
    material=(1.4 + 0.1j),
    medium=1.33,
)

scatterer.init(source)

scatterer.print_properties(4)

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

Download Jupyter notebook: properties_cylinder.ipynb

Download Python source code: properties_cylinder.py

Download zipped: properties_cylinder.zip

Gallery generated by Sphinx-Gallery

Show Source

© Copyright 2024, Martin Poinsinet de Sivry-Houle.

Created using Sphinx 8.2.3.

Built with the PyData Sphinx Theme 0.19.0.