eradiate.scenes.phase.TabulatedPhaseFunction#
- class eradiate.scenes.phase.TabulatedPhaseFunction(id='phase', *, data)[source]#
Bases:
PhaseFunction
Tabulated phase function [
tab_phase
].A lookup table-based phase function. The
data
field is aDataArray
with wavelength and angular dimensions.- Parameters:
- Fields:
Notes
The \(\mu\) coordinate must cover the \([-1, 1]\) interval but there is no constraint on value ordering or spacing. In particular, irregular \(\mu\) grids are supported.
For optimal performance, providing phase function data on a regular, sorted \(\mu\) grid is recommended.
- eval(spectral_ctx)[source]#
Evaluate phase function based on a spectral context. This method dispatches evaluation to specialized methods depending on the active mode.
- Parameters:
spectral_ctx (
SpectralContext
) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).- Returns:
ndarray
– Evaluated phase function as a 1D array.
- eval_mono(w)[source]#
Evaluate phase function in monochromatic modes.
- Parameters:
w (
pint.Quantity
) – Wavelength values at which the phase function is to be evaluated.- Returns:
ndarray
– Evaluated phase function as a 1D or 2D array depending on the shape of w (angle dimension comes last).
- traverse(callback)#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal
) – Callback data structure storing the collected data.
- update()#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property objects#
Map of child objects associated with this scene element.
- Returns:
dict
– A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- property params#
- Returns:
dict[str
,UpdateParameter
] orNone
– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- property template#
Kernel dictionary template contents associated with this scene element.
- Returns:
dict
– A flat dictionary mapping dot-separated strings describing the path of an item in the nested scene dictionary to values. Values may be objects which can be directly used by themitsuba.load_dict()
function, orInitParameter
instances which must be rendered.
See also