eradiate.scenes.measure.MultiDistantMeasure#

class eradiate.scenes.measure.MultiDistantMeasure(id='measure', spectral_cfg=_Nothing.NOTHING, spp=1000, split_spp=None, hplane=None, azimuth_convention=None, directions=array([[0., 0., - 1.]]), target=None)[source]#

Bases: eradiate.scenes.measure._core.Measure

Multi-distant radiance measure scene element [distant, mdistant, multi_distant].

This scene element creates a measure consisting of an array of radiancemeters positioned at an infinite distance from the scene. In practice, it can be used to compute the radiance leaving a scene at the top of the atmosphere (or canopy if there is no atmosphere). Coupled to appropriate post-processing operations, scene reflectance can be derived from the radiance values it produces.

Class method constructors

from_viewing_angles(zeniths, azimuths[, ...])

Construct a MultiDistantMeasure using viewing angles instead of raw directions.

Parameters
  • id (str, optional, default: "measure") – User-defined object identifier.

  • spectral_cfg (MeasureSpectralConfig or dict, default: MeasureSpectralConfig.new()) – Spectral configuration of the measure. Must match the current operational mode. Can be passed as a dictionary, which will be interpreted by MeasureSpectralConfig.from_dict().

  • spp (int, default: 1000) – Number of samples per pixel.

  • split_spp (int, optional) – If set, this measure will be split into multiple sensors, each with a sample count lower or equal to split_spp. This parameter should be used in single-precision modes when the sample count is higher than 100,000 (very high sample count might result in floating point number precision issues otherwise).

  • hplane (float or quantity, optional, default: None) – If all directions are expected to be within a hemisphere plane cut, the azimuth value of that plane. Unitless values are converted to ucc['angle']. The convention specified as the azimuth_convention field applies.

  • azimuth_convention (AzimuthConvention or str, optional, default: None) – Azimuth convention. If None, the global default configuration is used (see EradiateConfig).

  • directions (array-like, default: [[0, 0, -1]]) – A sequence of 3-vectors specifying distant sensing directions.

  • target (Target or dict or array-like, optional) – Target specification. The target can be specified using an array-like with 3 elements (which will be converted to a TargetPoint) or a dictionary interpreted by Target.convert(). If set to None (not recommended), the default target point selection method is used: rays will not target a particular region of the scene.

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

  • spectral_cfg (MeasureSpectralConfig) – Spectral configuration of the measure.

  • spp (int) – Number of samples per pixel.

  • split_spp (int) – If set, this measure will be split into multiple sensors, each with a sample count lower or equal to split_spp.

  • hplane (quantity or None) – If all directions are expected to be within a hemisphere plane cut, the azimuth value of that plane.

  • azimuth_convention (AzimuthConvention) – Azimuth convention.

  • directions (ndarray) – A sequence of 3-vectors specifying distant sensing directions.

  • target (Target or None) – Target specification.

Notes

  • Setting the target parameter is required to get meaningful results. Experiment classes should take care of setting it appropriately.

classmethod from_viewing_angles(zeniths, azimuths, auto_hplane=True, **kwargs)[source]#

Construct a MultiDistantMeasure using viewing angles instead of raw directions.

Parameters
  • zeniths (array-like) – List of zenith values (can be a quantity). Scalar values are broadcast to the same shape as azimuths. Unitless values are converted to ucc['angle'].

  • azimuths (array-like) – List of azimuth values (can be a quantity). Scalar values are broadcast to the same shape as zeniths. Unitless values are converted to ucc['angle'].

  • auto_hplane (bool, optional) – If True, passing a scalar as azimuths will automatically set the measure’s hplane parameter, unless an hplane keyword argument is also passed.

  • **kwargs – Any keyword argument (except direction) to be forwarded to MultiDistantMeasure(). The hplane keyword argument takes precedence over auto_hplane.

Returns

MultiDistantMeasure

is_distant()#

Return True iff measure records radiometric quantities at infinite distance.

is_split()#

Return True iff sample count split shall be activated.

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.

property film_resolution#

Getter for film resolution as a (int, int) pair.

Type

tuple

property sensor_dims#

List of sensor dimension labels.

Type

tuple of str

property var#

Post-processing variable field name and metadata.

Type

str, dict

property viewing_angles#

Viewing angles computed from stored directions as a (N, 1, 2) array, where N is the number of directions. The last dimension is ordered as (zenith, azimuth).

Type

quantity