eradiate.scenes.phase.BlendPhaseFunction
eradiate.scenes.phase.BlendPhaseFunction#
- class eradiate.scenes.phase.BlendPhaseFunction(id='phase', bbox=None, *, components, weights)[source]#
Bases:
eradiate.scenes.phase._core.PhaseFunction
Blended phase function [
blend_phase
].This phase function aggregates two or more sub-phase functions (components) and blends them based on its weights parameter. Weights are usually based on the associated medium’s scattering coefficient.
- Parameters
id (
str
, optional, default:"phase"
) – User-defined object identifier.components (
list
ofPhaseFunction
orlist
ofdict
) – List of components (at least two). This parameter has not default.weights (array-like) – List of weights associated with each component. Must be of shape (n,) or (n, m) where n is the number of components and m the number of cells along the atmosphere’s vertical axis. This parameter has no default.
bbox (
quantity
or array-like orBoundingBox
, optional, default:None
) – Optional bounding box describing the extent of the volume associated with this phase function.
- Fields
components (
list
ofPhaseFunction
) – List of components (at least two).weights (
ndarray
) – List of weights associated with each component.bbox (
BoundingBox
orNone
) – Optional bounding box describing the extent of the volume associated with this phase function.
- kernel_dict(ctx)[source]#
Return a dictionary suitable for kernel scene configuration.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
KernelDict
– Kernel dictionary which can be loaded as a Mitsuba object.