eradiate_disort¶
Classes:
|
Eradiate DISORT backend. |
|
DISORT measurement [ |
- class eradiate_disort.DisortBackend(nstr: int = 16, nmom: int = 16, intensity_correction: str = 'buras_emde', verbose: bool = False, state: DisortState = NOTHING, results: dict[Hashable, dict] = NOTHING, postprocess_ctx: dict = NOTHING, name: str = 'CDISORT')[source]¶
Bases:
objectEradiate DISORT backend.
This class implements an experimental Eradiate radiometric backend that uses the CDISORT implementation of the DISORT algorithm. It supports 1D scenes with atmospheres featuring an arbitrary number of components and can generally be used as a fast alternative to the Monte Carlo ray tracing backend on plane-parallel geometries.
- Parameters:
nstr (int, default: 16) – Number of streams (angular discretization).
nmom (int, default: 16) – Number of Legendre moments used to represent scattering distributions (phase functions and BRDFs).
verbose (bool, default: False) – If
False, silence CDISORT terminal output.intensity_correction ({"nakajima_tanaka", "buras_emde"}, default: "buras_emde") – Intensity correction method.
"nakajima_tanaka"uses only Legendre moments and is always available."buras_emde"additionally requires the actual phase function values and is more accurate for sharply peaked phase functions.
See also
Methods:
postprocess(exp[, measure])Run the postprocessing step and return a DataTree.
process(exp[, measure])Run the processing step for a given Experiment configuration.
run(exp[, measure])Run validation, processing, and postprocessing in sequence.
validate(exp)Check internal state consistency and compatibility with the passed Experiment configuration.
- postprocess(exp: AtmosphereExperiment, measure: None | int | str = None) DataTree[source]¶
Run the postprocessing step and return a DataTree.
Returns a DataTree with one subtree per measure, keyed by measure ID. The
measureargument is accepted for API compatibility but ignored; all measures are always included in the output.
- process(exp: AtmosphereExperiment, measure: None | int | str = None) None[source]¶
Run the processing step for a given Experiment configuration.
All measures in the experiment are processed together in a single spectral loop. The spectral grid is taken from
measure(default: the first measure).
- run(exp: AtmosphereExperiment, measure: None | int | str = None) DataTree[source]¶
Run validation, processing, and postprocessing in sequence.
- Parameters:
- Returns:
Post-processed results, one subtree per measure.
- Return type:
DataTree
- validate(exp: AtmosphereExperiment)[source]¶
Check internal state consistency and compatibility with the passed Experiment configuration.
- Parameters:
exp (AtmosphereExperiment) – Processed experiment configuration.
- Raises:
TypeError – If validation fails.
- class eradiate_disort.DisortMeasure(id: str | None = 'measure', srf=NOTHING, sampler: str = 'independent', rfilter: str = 'box', spp=1000, *, direction_layout: HemispherePlaneLayout | AzimuthRingLayout | GridLayout | None = None, z_levels: Quantity | None = None, utau: ndarray | None = None)[source]¶
Bases:
MeasureDISORT measurement [
disort].Records irradiance (flux) and intensity quantities at user-specified altitudes or optical depths. When a direction layout is specified, also records the full spectral radiance field
uu(umu, utau, phi).When no
direction_layoutis given (the default), DISORT runs withonlyfl = True, skipping angular radiance computation for speed.The following irradiance and intensity quantities are always recorded:
rfldir: direct-beam downward irradiancerfldn: diffuse downward irradianceflup: diffuse upward irradiancedfdt: flux divergence d(net flux)/d(tau)uavg: intensity (direct + diffuse)uavgdn: diffuse downward intensityuavgup: diffuse upward intensityuavgso: direct-beam intensity
- Parameters:
direction_layout (HemispherePlaneLayout or AzimuthRingLayout or GridLayout, optional) –
Viewing direction specification. Only structured layouts are accepted:
HemispherePlaneLayout(hemisphere plane cut)AzimuthRingLayout(azimuth ring)GridLayout(zenith × azimuth grid)
Defaults to
None(flux-only mode). Use thehplane(),aring(), orgrid()class-method constructors for convenience.z_levels (quantity, optional) – Output altitudes. Each value is snapped to the nearest zgrid level boundary. Mutually exclusive with
utau. If neither is set, defaults to TOA and BOA.utau (array-like, optional) – Output optical depths from TOA. Mutually exclusive with
z_levels. If neither is set, defaults to TOA and BOA.
Notes
The
kernel_typeandtemplateproperties are not implemented; this measure type is only usable with the DISORT backend.Methods:
aring(zenith, azimuths, **kwargs)Construct using an azimuth-ring viewing direction layout.
grid(zeniths, azimuths, **kwargs)Construct using a gridded (Cartesian product) viewing direction layout.
hplane(zeniths, azimuth, **kwargs)Construct using a hemisphere-plane viewing direction layout.
Return
Trueiff measure records radiometric quantities at infinite distance.traverse(callback)Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
update()Enforce internal state consistency.
Attributes:
Getter for film resolution as a (int, int) pair.
Map of child objects associated with this scene element.
returns: A dictionary mapping parameter paths, consisting of dot-separated
Kernel dictionary template contents associated with this scene element.
Post-processing variable field name and metadata.
- classmethod aring(zenith: float | Quantity, azimuths: ArrayLike, **kwargs) DisortMeasure[source]¶
Construct using an azimuth-ring viewing direction layout.
- Parameters:
zenith (float or quantity) – Ring zenith angle. Unitless values are converted to
ucc['angle'].azimuths (array-like) – Azimuth values. Unitless values are converted to
ucc['angle'].azimuth_convention (AzimuthConvention or str, optional) – Azimuth convention for the layout.
**kwargs – Forwarded to
DisortMeasure.
- classmethod grid(zeniths: ArrayLike, azimuths: ArrayLike, **kwargs) DisortMeasure[source]¶
Construct using a gridded (Cartesian product) viewing direction layout.
- Parameters:
zeniths (array-like) – Zenith values.
azimuths (array-like) – Azimuth values.
azimuth_convention (AzimuthConvention or str, optional) – Azimuth convention for the layout.
**kwargs – Forwarded to
DisortMeasure.
- classmethod hplane(zeniths: ArrayLike, azimuth: float | Quantity, **kwargs) DisortMeasure[source]¶
Construct using a hemisphere-plane viewing direction layout.
- Parameters:
zeniths (array-like) – Zenith angle values. Negative values map to the
azimuth + 180°half-plane. Unitless values are converted toucc['angle'].azimuth (float or quantity) – Azimuth of the hemisphere plane cut.
azimuth_convention (AzimuthConvention or str, optional) – Azimuth convention for the layout.
**kwargs – Forwarded to
DisortMeasure.
- property objects: dict[str, NodeSceneElement] | None¶
Map of child objects associated with this scene element.
- Returns:
A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- Return type:
- property params: dict[str, SceneParameter] | None¶
- returns: A dictionary mapping parameter paths, consisting of dot-separated
strings, to a corresponding update protocol.
- Return type:
dict[str,
SceneParameter] or None
See also
SceneParameter,KernelSceneParameterMap
- property template: dict¶
Kernel dictionary template contents associated with this scene element.
- Returns:
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 the
mitsuba.load_dict()function, orDictParameterinstances which must be rendered.- Return type:
See also
DictParameter,KernelDict
- traverse(callback: SceneTraversal) None¶
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (SceneTraversal) – Callback data structure storing the collected data.