Example gallery#
Choose a topic below. Each runnable script includes its calculation settings, explanations, and figures alongside the code that produces them. Medium volumes and 3D phase surfaces use Plotly exclusively. Matplotlib is used for angular curves and numerical diagnostics; spatial samples are never rendered as 2D images. Inputs use SI-compatible quantities. Analytical examples describe infinite-medium first-order scattering; numerical Born-series examples describe finite samples.
Keep each separate figure in its own code cell: call plt.show() after
plotting, then insert a # %% separator and narrative comments before
creating the next figure. Multiple axes comparing related data may share a
single figure. This keeps each gallery image beside its plotting code and
displays figures one at a time when running the scripts locally.
All 3D calls return Plotly figures. Assign each figure to a named variable;
the gallery embeds it automatically. When running scripts locally, call
figure.show(renderer="browser") unless --no-browser is supplied.
The documentation builder supplies that argument and exports interactive
figures with a local Plotly library. Controls affect display only, not
numerical resolution.
Random media#
Seeded random fields, numerical ensembles, phase functions, and wavelength dependence.
Theory figure: covariance and simulated random fields
Wavelength dependence of scattering and anisotropy
Structured media#
Build spheres, finite layers, and combined structured and random samples. Explore how geometry and relative positions affect directional scattering. Create concentric core–shell spheres and oriented ellipsoids, or repeat a geometric motif in a centred finite lattice and inspect coherent interference. Use finite dielectric cylinders as rod or antenna-like scatterers, with explicit axis and orientation controls.
Oblique illumination examples specify unit propagation and complex transverse polarization vectors, comparing linear, circular, and elliptical states on one anisotropic particle through third Born order.
Finite dielectric rods for antenna-like scatterers
Oblique illumination and linear, circular, and elliptical polarization
Layers and scatterers with numerical random fluctuations
Theory figure: translation and directional interference
Born orders and interference#
Compare cumulative Born orders and inspect coherent amplitude interference. Field-term diagnostics alone do not certify convergence.
Six examples cover order comparisons, term interference, absorption, contrast sensitivity, wavelength dependence through fifth order, and coupling between two spheres. Higher orders retain the linearized dielectric contrast and spherical Green self cell; decreasing corrections do not certify convergence.
Contrast sensitivity of successive Born corrections
Plotting and saving results#
Plot differential scattering and directional phase functions, then save and restore unitful results with their calculation settings.
Six examples cover plotting, archives, coherent and diffuse scattering, phase-density normalization, angular cuts versus full directional solves, and the distinction between cross sections and box-normalized coefficients. The calculations include second-, third-, and fourth-order solves.
Coherent and diffuse scattering in an absorbing ensemble
Numerical validation#
Check voxel and angular refinement, ensemble sampling uncertainty, and finite-size effects independently.
Explicit refinement studies and equation residuals