Skip to main content
Ctrl+K
PyMieSim light-scattering logo PyMieSim light-scattering logo
  • Start
  • Guide
  • Examples
  • API
  • Resources
  • GitHub
  • PyPI
  • Anaconda
  • Start
  • Guide
  • Examples
  • API
  • Resources
  • GitHub
  • PyPI
  • Anaconda

Section Navigation

  • Single Module
    • Coupling
    • Far-Fields Computation and Visualization
    • Scatterer Footprint Calculation and Visualization
    • Near-Field Computation and Visualization
    • Inspect scalar scattering properties
    • 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
      • Size distribution: independent scattering only
      • Compare size distribution families
      • How distribution width changes the scattering phase function
  • Inverse Problems
    • Fit a scalar scale factor
    • Fit an isolated-sphere scattering measurement
    • Fit a unit-aware diameter
  • Interpreting scattering results
    • Diagnose a sphere fit across several wavelengths
    • See how particle size reshapes angular scattering
    • Separate scattering and absorption resonances
  • 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
  • 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 cylinder properties
    • Print sphere properties
  • Coding examples
  • Extra Examples
  • Print sphere properties

Note

Go to the end to download the full example code.

Print sphere properties#

Initialize the scatterer with a source, then call print_properties(). The printed table uses four decimal places in scientific notation by default. Efficiencies are dimensionless; geometric lengths and cross sections include their units in the table. This example produces text rather than a plot.

Scatterer Type: Sphere
property         | 0.0000e+00 | unit
-----------------|--------------------|------
size_parameter   | 2.5133e+00 |
radius           | 4.0000e-07 | m
RI real          | 1.4000e+00 |
RI imag          | 0.0000e+00 |
medium RI        | 1.0000e+00 |
volume           | 2.6808e-19 | m^3
cross_section    | 5.0265e-13 | m^2
g                | 6.9601e-01 |
Qsca             | 1.7376e+00 |
Qext             | 1.7376e+00 |
Qabs             | 0.0000e+00 |
Qback            | 3.5502e-01 |
Qratio           | 2.0431e-01 |
Qpr              | 5.2823e-01 |
Csca             | 8.7344e-13 | m^2
Cext             | 8.7344e-13 | m^2
Cabs             | 0.0000e+00 | m^2
Cback            | 1.7845e-13 | m^2
Cratio           | 1.0270e-13 | m^2
Cpr              | 2.6552e-13 | m^2

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


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

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

scatterer = Sphere(
    diameter=800 * ureg.nanometer,
    material=1.4,
    medium=1.0,
)

scatterer.init(source=source)

scatterer.print_properties()

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

Download Jupyter notebook: properties_sphere.ipynb

Download Python source code: properties_sphere.py

Download zipped: properties_sphere.zip

Gallery generated by Sphinx-Gallery

previous

Print cylinder properties

next

API Reference

Edit on GitHub
Show Source

© Copyright Martin Poinsinet de Sivry-Houle.