eradiate.scenes.measure.DistantFluxMeasure
eradiate.scenes.measure.DistantFluxMeasure#
- class eradiate.scenes.measure.DistantFluxMeasure(id='measure', spectral_cfg=_Nothing.NOTHING, spp=1000, split_spp=None, azimuth_convention=None, direction=[0, 0, 1], target=None, film_resolution=(32, 32))[source]#
Bases:
eradiate.scenes.measure._core.Measure
Distant radiosity measure scene element [
distant_flux
].This measure records the [spectral] radiosity (in W/m²[/nm]) at an infinite distance in a hemisphere defined by its
direction
parameter.When used with a backward tracing algorithm, rays traced by the sensor target a shape which can be controlled through the
target
parameter. This feature is useful if one wants to compute the average flux leaving a particular subset of the scene.- Parameters
id (
str
, optional, default:"measure"
) – User-defined object identifier.spectral_cfg (
MeasureSpectralConfig
ordict
, default:MeasureSpectralConfig.new()
) – Spectral configuration of the measure. Must match the current operational mode. Can be passed as a dictionary, which will be interpreted byMeasureSpectralConfig.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).azimuth_convention (
AzimuthConvention
orstr
, optional, default:None
) – Azimuth convention. IfNone
, the global default configuration is used (seeEradiateConfig
).direction (array-like, default:
[0
,0
,1]
) – A 3-vector defining the normal to the reference surface for which the exitant flux density is computed.target (
Target
ordict
or array-like, optional) – Target specification. The target can be specified using an array-like with 3 elements (which will be converted to aTargetPoint
) or a dictionary interpreted byTarget.convert()
. If set toNone
(not recommended), the default target point selection method is used: rays will not target a particular region of the scene.film_resolution (array-like, default:
(32
,32)
) – Film resolution as a (width, height) 2-tuple.
- Fields
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.azimuth_convention (
AzimuthConvention
) – Azimuth convention.direction (array-like) – A 3-vector defining the normal to the reference surface for which the exitant flux density is computed.
Notes
Setting the
target
parameter is required to get meaningful results. Experiment classes should take care of setting it appropriately.The film resolution can be adjusted to manually stratify film sampling and reduce variance in results. The default 32x32 is generally a good choice, but scenes with sharp reflection lobes may benefit from higher values.
- 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 sensor_dims#
List of sensor dimension labels.
- Type
tuple of str
- property viewing_angles#
Viewing angles computed from stored film coordinates as a (width, height, 2) array. The last dimension is ordered as (zenith, azimuth).
- Type
quantity