eradiate.scenes.atmosphere.HomogeneousAtmosphere#

class eradiate.scenes.atmosphere.HomogeneousAtmosphere(id='atmosphere', geometry='plane_parallel', sigma_s=_Nothing.NOTHING, sigma_a=0.0, phase=_Nothing.NOTHING)[source]#

Bases: Atmosphere

Homogeneous atmosphere scene element [homogeneous].

This class builds an atmosphere consisting of a homogeneous medium with customizable collision coefficients and phase function.

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

  • geometry (SceneGeometry) – Parameters defining the basic geometry of the scene.

  • sigma_s (Spectrum or float) – Atmosphere scattering coefficient value.

  • sigma_a (Spectrum) – Atmosphere absorption coefficient value.

eval_albedo(spectral_ctx)[source]#

Return albedo.

Parameters:

spectral_ctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).

Returns:

quantity – Albedo.

eval_mfp(ctx)[source]#

Compute a typical scattering mean free path. This rough estimate can be used e.g. to compute a distance guaranteeing that the medium can be considered optically thick.

Parameters:

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns:

mfp (quantity) – Mean free path estimate.

eval_sigma_a(sctx)[source]#

Return absorption coefficient.

Parameters:

sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).

Returns:

quantity – Absorption coefficient.

eval_sigma_s(sctx)[source]#

Return scattering coefficient.

Parameters:

sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).

Returns:

quantity – Scattering coefficient.

eval_sigma_t(sctx)[source]#

Return extinction coefficient.

Parameters:

sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).

Returns:

quantity – Extinction coefficient.

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()[source]#

Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.

property bottom_altitude#
Returns:

quantity – Atmosphere bottom altitude.

property height#
Returns:

quantity – Atmosphere height.

property medium_id#
Returns:

str – ID of the medium associated with the atmosphere in the Mitsuba scene tree.

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 phase#
Returns:

PhaseFunction – Phase function associated with the atmosphere.

property phase_id#
Returns:

str – ID of the phase function associated with the atmosphere in the Mitsuba scene tree.

property shape#
Returns:

Shape – Shape associated with this atmosphere, based on the scene geometry.

property shape_id#
Returns:

str – ID of the shape associated with the atmosphere in the Mitsuba scene tree.

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 top_altitude#
Returns:

quantity – Atmosphere top altitude.