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:
id (
str
, optional, default:"atmosphere"
) – Identifier of the current scene element.geometry (
SceneGeometry
ordict
orstr
, optional, default:"plane_parallel"
) – Parameters defining the basic geometry of the scene.sigma_s (
Spectrum
orfloat
, default:AirScatteringCoefficientSpectrum()
) – Atmosphere scattering coefficient value.Can be initialised with a dictionary processed by
spectrum_factory
.sigma_a (
Spectrum
, default:0.0 km**-1
) – Atmosphere absorption coefficient value. Defaults disable absorption.Can be initialised with a dictionary processed by
spectrum_factory
.phase (
PhaseFunction
, default:RayleighPhaseFunction()
) – Scattering phase function.Can be initialised with a dictionary processed by
phase_function_factory
.
- Fields:
- 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 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
] orNone
– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- 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 themitsuba.load_dict()
function, orInitParameter
instances which must be rendered.
See also