The HoloPy Scatterer¶
The HoloPy Scatterer
class defines objects that are described by
numerical quantities (e.g. dimension, location, refractive index) and have
known light-scattering behaviour described by a ScatteringTheory
.
- Scatterers are generally used in two scenarios:
- All numerical properties (e.g. dimension, location, refractive index) are fixed to simulate a specific light scattering experiment.
- Some numerical properties are defined as
Prior
objects, representing unknown values to be determined in an inference calculation.
You can find examples of these use cases in the Scattering Calculations and Fitting Models to Data tutorials.
Scatterer objects in HoloPy are inherited from two base classes:
- CenteredScatterer describes a single object, with an optional location specified
- Scatterers describes a collection of individual scatterers
Scatterer Attributes¶
All HoloPy Scatterer classes have the following properties/methods:
- General manipulation
x
,y
,z
Components of scatterer centertranslated()
New scatterer with location coordinates shifted by a vector
- Inference calculations
parameters
Dictionary of all values needed to describe the scatterer. Values described asPrior
objects will appear that way here as well.from_parameters()
New scatterer built from a dictionary of parameters
- Discretization
indicators
Function(s) to describe region(s) of space occupied by scatterer domain(s)index_at()
Scatterer’s refractive index at given coordinatesin_domain()
Which domain of the scatterer the given coordinates are incontains()
Check whether a particular point is in any domains of the scatterernum_domains
Number of domains of the scattererbounds
Extents of the scatterer in each dimensionvoxelate()
3D voxel grid representation of the scatterer containing its refractive index at each point
Individual Scatterers¶
CenteredScatterer
objects are not instantiated directly,
but instead in one of the subclasses:
Sphere
Can contain multiple concentric layers defined by their outer radiusLayeredSphere
Defines multiple concentric layers by their layer thicknessCylinder
Ellipsoid
Spheroid
Bisphere
Union of two spheresCapsule
Cylinder with semi-spherical caps on either endJanusSphere_Uniform
Sphere with a semi-spherical outer layer of constant thicknessJanusSphere_Tapered
Sphere with a semi-spherical outer layer that has a crescent profileCsgScatterer
Allows for construction of an arbitrary scatterer by constructive solid geometry
Composite Scatterers¶
Scatterers
objects contain multiple individual scatterers,and
support the following features in addition to those shared with
CenteredScatterer
:
- Component scatterer handling
- Support for selecting component scatterers with square brackets and python slicing syntax
add()
Adds a new scatterer to the composite in-placerotated()
New scatterer rotated about its center according to HoloPy rotation conventions
There are two specific composite scatterer classes for working with collections of spheres that have additional functionality:
Spheres
A collection of spherical scatterers, with the following properties:
overlaps
List of pairs of component spheres that overlaplargest_overlap
Maximum overlap distance between component spheres
RigidCluster
- A collection of spherical scatterers in fixed relative positions.
The entire cluster can be translated and/or rotated.
RigidCluster.scatterers
andRigidCluster.from_parameters()
both returnSpheres
type objects.