eradiate.scenes.measure.HemisphericalDistantMeasure#

class eradiate.scenes.measure.HemisphericalDistantMeasure(id='measure', spectral_cfg=_Nothing.NOTHING, sampler='independent', spp=1000, target=None, ray_offset=None, azimuth_convention=None, film_resolution=(32, 32), orientation=<Quantity(0.0, 'degree')>, direction=[0, 0, 1])[source]#

Bases: DistantMeasure

Hemispherical distant radiance measure scene element [hdistant, hemispherical_distant].

This scene element records radiance leaving the scene in a hemisphere defined by its direction parameter. A distinctive feature of this measure is that it samples continuously the direction space instead of computing radiance values for a fixed set of directions, thus potentially capturing effects much harder to distinguish using e.g. the MultiDistantMeasure class. On the other side, features located at a precise angle will not be captured very well by this measure.

This measure is useful to get a global view of leaving radiance patterns over a surface.

Parameters:
  • id (str, optional, default: "measure") – Identifier of the current scene element.

  • 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().

  • sampler ({"independent", "stratified", "multijitter", "orthogonal", "ldsampler"}, default: "independent") – Mitsuba sampler used to generate pseudo-random number sequences.

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

  • 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.

  • ray_offset (float or quantity, optional, default: None) – Manually control the distance between the target and ray origins. If unset, ray origins are positioned outside of the scene and this measure is rigorously distant.

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

  • film_resolution (array-like, default: (32, 32)) – Film resolution as a (width, height) 2-tuple. If the height is set to 1, direction sampling will be restricted to a plane.

  • orientation (float, default: 0.0 deg) – Azimuth angle defining the orientation of the sensor in the horizontal plane.

    Unit-enabled field (default: ucc[‘angle’]).

  • direction (array-like, default: [0, 0, 1]) – A 3-vector orienting the hemisphere mapped by the measure.

Fields:
  • id (str or None) – Identifier of the current scene element.

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

  • sampler (str) – Mitsuba sampler used to generate pseudo-random number sequences.

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

  • target (Target or None) – Target specification.

  • ray_offset (quantity or None) – Manually control the distance between the target and ray origins.

  • azimuth_convention (AzimuthConvention) – Azimuth convention.

  • orientation (float) – Azimuth angle defining the orientation of the sensor in the horizontal plane.

  • direction (array-like) – A 3-vector orienting the hemisphere mapped by the measure.

Notes

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

is_distant()#

Return True iff measure records radiometric quantities at infinite distance.

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 film_resolution#

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

Type:

tuple

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] or None – A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.

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 the mitsuba.load_dict() function, or InitParameter instances which must be rendered.

property var#

Post-processing variable field name and metadata.

Type:

str, dict

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