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 of PhaseFunction or list of dict) – 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 or BoundingBox, optional, default: None) – Optional bounding box describing the extent of the volume associated with this phase function.

Fields
  • id (str or None) – User-defined object identifier.

  • components (list of PhaseFunction) – List of components (at least two).

  • weights (ndarray) – List of weights associated with each component.

  • bbox (BoundingBox or None) – 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.