Scattering spec¶
spec
¶
The problem specification: one description, solved by any backend.
Units: lengths and wavelengths in nanometres (vacuum wavelength). Conventions: exp(-iomegat); cross sections in nm^2; efficiencies are normalised by the geometric cross section of the volume-equivalent sphere, pi * r_eq^2, so they are comparable across methods and shapes.
Shape
module-attribute
¶
Shape = Annotated[Union[Sphere, Spheroid, Cylinder, LayeredSphere], Field(discriminator='kind')]
Sphere
¶
Spheroid
¶
Bases: _Model
Spheroid with symmetry axis along z.
Cylinder
¶
Bases: _Model
Flat-ended cylinder with axis along z.
Shell
¶
LayeredSphere
¶
Bases: _Model
Core-shell / multilayer sphere. The particle's material is the core;
shells are listed from the inside out.
Particle
¶
Substrate
¶
PlaneWave
¶
Bases: _Model
direction
class-attribute
instance-attribute
¶
direction: tuple[float, float, float] = Field((0.0, 0.0, 1.0), description='Propagation direction.')
polarization
class-attribute
instance-attribute
¶
polarization: tuple[float, float, float] = Field((1.0, 0.0, 0.0), description='Real E-field direction.')
WavelengthRange
¶
NearFieldRequest
¶
FarFieldRequest
¶
Bases: _Model
Differential scattering cross section dC_sca/dOmega on a theta x phi grid.
theta is measured from the incident direction; phi is the azimuth around it, measured from the incident polarization (phi=0 is the E-plane, 90 the H-plane).
Outputs
¶
Bases: _Model
Simulation
¶
Bases: _Model
A complete scattering problem. Serialisable to/from JSON.
medium_index
class-attribute
instance-attribute
¶
wavelengths
class-attribute
instance-attribute
¶
wavelengths: list[float] | WavelengthRange = Field(description='Vacuum wavelengths in nm.')
substrate
class-attribute
instance-attribute
¶
substrate: Substrate | None = Field(None, description='Optional half-space below the particles.')
orientation_average
class-attribute
instance-attribute
¶
orientation_average: bool = Field(False, description='Average cross sections over all particle orientations.')
options
class-attribute
instance-attribute
¶
options: dict[str, dict[str, Any]] = Field(default_factory=dict, description="Solver options keyed by method or backend name, e.g. {'dda': {'dipoles_per_diameter': 20}}.")
options_for
¶
Method-level options overlaid with backend-specific ones.