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)