User guide#
Follow the calculation workflow from a physical sample to saved scattering results. Start with Getting started for a complete runnable calculation; use Examples for comparisons and Public Python API for parameter details.
Build a medium#
Choose a statistical medium such as GaussianMedium, or compose explicit
shapes with StructuredMedium. Set the background refractive index, geometry,
and fluctuation statistics explicitly. Voxelize on a Grid with physical
spacing; keep the random seed to reproduce a realization. See the
random-medium examples and
structured-medium examples.
Configure illumination#
Create a Source with a unit-bearing vacuum wavelength. Set its incident
direction and polarization when needed; the default is unpolarized illumination
along laboratory +z. The Incident direction and polarization reference explains
Jones states and coordinate conventions.
Solve and sample directions#
Create a Solver with the source and requested Born order. Use
AngularSampling for full solid-angle integration, or Directions for
explicit observation directions. Call solver.solve(target=volume) for a
fixed sample. Use solver.ensemble(...) with explicit ensemble sampling for
independent random realizations and sampling uncertainty. Angular cuts alone
cannot provide integrated coefficients or phase-function normalization.
Inspect and save results#
Use volume.plot_3d() to inspect spatial media with Plotly and
result.plot_phase_function() for a directional 3D surface. Matplotlib
provides angular curves and statistical diagnostics. The
Medium visualization guide describes interactive controls and export.
Save results with result.save(...) and reload them with Result.load(...).
The result examples demonstrate archives,
normalization, and derived quantities. Preserve the original voxel field or its
seeded construction separately; result archives do not contain it.
Check accuracy#
Before interpreting a calculation, assess spatial, angular, ensemble, and Born order sensitivity. Finite-sample coefficients are not automatically intrinsic infinite-medium coefficients. See Theory & validation for assumptions and independent validation.