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
Priorobjects, 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
translated()New scatterer with location coordinates shifted by a vector
- Inference calculations
parametersDictionary of all values needed to describe the scatterer. Values described asPriorobjects will appear that way here as well.from_parameters()New scatterer built from a dictionary of parameters
- Discretization
indicatorsFunction(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_domainsNumber of domains of the scattererboundsExtents 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:
SphereCan contain multiple concentric layers defined by their outer radiusLayeredSphereDefines multiple concentric layers by their layer thicknessBisphereUnion of two spheresCapsuleCylinder with semi-spherical caps on either endJanusSphere_UniformSphere with a semi-spherical outer layer of constant thicknessJanusSphere_TaperedSphere with a semi-spherical outer layer that has a crescent profileCsgScattererAllows 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
Although you can add any scatterer to a Scatterers object, HoloPy
cannot yet calculate holograms from a Scatterers object consisting of
non-spherical particles. However, you can calculate holograms of collections of
spheres using the two specific composite scatterer classes below, which have
additional functionality:
SpheresA collection of spherical scatterers, with the following properties:
overlapsList of pairs of component spheres that overlaplargest_overlapMaximum overlap distance between component spheres
RigidClusterA collection of spherical scatterers in fixed relative positions. The entire cluster can be translated and/or rotated.
RigidCluster.scatterersandRigidCluster.from_parameters()both returnSpherestype objects.