eradiate.scenes.atmosphere.AbstractHeterogeneousAtmosphere#

class eradiate.scenes.atmosphere.AbstractHeterogeneousAtmosphere(id='atmosphere', geometry='plane_parallel', scale=None)[source]#

Bases: Atmosphere, ABC

Abstract base class for heterogeneous atmospheres.

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.

  • scale (float, optional) – If set, the extinction coefficient is scaled by the corresponding amount during computation.

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

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

  • scale (float or None) – If set, the extinction coefficient is scaled by the corresponding amount during computation.

abstract eval_albedo(sctx, zgrid=None)[source]#

Evaluate albedo spectrum based on a spectral context. This method dispatches evaluation to specialized methods depending on the active mode.

Parameters:
  • sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).

  • zgrid (ZGrid, optional) – Altitude grid on which evaluation is performed. If unset, an instance-specific default is used (see zgrid).

Returns:

quantity – Evaluated spectrum as an array with length equal to the number of layers.

abstract eval_mfp(ctx)#

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_radprops(sctx, zgrid=None, optional_fields=False)[source]#

Evaluate the extinction coefficients and albedo profiles.

Parameters:
  • sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).

  • zgrid (ZGrid, optional) – Altitude grid on which evaluation is performed. If unset, an instance-specific default is used (see zgrid).

  • optional_fields (bool, optional, default: False) – If True, also output the absorption and scattering coefficients, not required for scene setup but useful for analysis and debugging.

Returns:

Dataset – A dataset with the following variables:

  • sigma_t: extinction coefficient;

  • albedo: albedo;

  • sigma_a: absorption coefficient (optional);

  • sigma_s: scattering coefficient (optional).

and coordinates:

  • z: altitude.

abstract eval_sigma_a(sctx, zgrid=None)[source]#

Evaluate absorption coefficient given a spectral context.

Parameters:
  • sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).

  • zgrid (ZGrid, optional) – Altitude grid on which evaluation is performed. If unset, an instance-specific default is used (see zgrid).

Returns:

quantity – Particle layer extinction coefficient.

abstract eval_sigma_s(sctx, zgrid=None)[source]#

Evaluate scattering coefficient given a spectral context.

Parameters:
  • sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).

  • zgrid (ZGrid, optional) – Altitude grid on which evaluation is performed. If unset, an instance-specific default is used (see zgrid).

Returns:

quantity – Particle layer scattering coefficient.

abstract eval_sigma_t(sctx, zgrid=None)[source]#

Evaluate extinction coefficient given a spectral context.

Parameters:
  • sctx (SpectralContext) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).

  • zgrid (ZGrid, optional) – Altitude grid on which evaluation is performed. If unset, an instance-specific default is used (see zgrid).

Returns:

quantity – Particle layer 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]#

Update internal state.

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.

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

property top_altitude#
Returns:

quantity – Atmosphere top altitude.