eradiate.scenes.atmosphere.Atmosphere

class eradiate.scenes.atmosphere.Atmosphere(id='atmosphere', geometry='plane_parallel')[source]

Bases: CompositeSceneElement, ABC

Abstract base class defining common facilities for all atmospheres.

An atmosphere expands as a mitsuba.PhaseFunction, a mitsuba.Medium and a mitsuba.Shape.

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

  • geometry (SceneGeometry or dict or str, optional, default: "plane_parallel") – Parameters defining the basic geometry of the scene. Note if the atmosphere is used in a simulation, the experiment has all control over the atmosphere’s geometry and is going to set it. Therefore, in such a case it is best to define the geometry at the experiment level. When the atmosphere is used standalone, care must be taken to ensure that the geometry is consistent with the vertical extent of the atmosphere.

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

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

abstract 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 (KernelContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns:

mfp (quantity) – Mean free path estimate.

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

abstract 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 DictParameter instances which must be rendered.

property top_altitude
Returns:

quantity – Atmosphere top altitude.