eradiate.scenes.atmosphere.HomogeneousAtmosphere
eradiate.scenes.atmosphere.HomogeneousAtmosphere#
- class eradiate.scenes.atmosphere.HomogeneousAtmosphere(id='atmosphere', geometry=None, bottom=<Quantity(0.0, 'kilometer')>, top=<Quantity(10.0, 'kilometer')>, sigma_s=_Nothing.NOTHING, sigma_a=0.0, phase=_Nothing.NOTHING)[source]#
Bases:
eradiate.scenes.atmosphere._core.Atmosphere
Homogeneous atmosphere scene element [
homogeneous
].This class builds an atmosphere consisting of a homogeneous medium with customisable collision coefficients and phase function, attached to a cuboid shape.
- Parameters
id (
str
, optional, default:"atmosphere"
) – User-defined object identifier.geometry (
AtmosphereGeometry
ordict
orstr
, optional, default:None
) – Parameters defining the basic geometry of the atmosphere.bottom (
quantity
orfloat
, default:0 km
) – Atmosphere’s bottom altitude.Unit-enabled field (default: ucc[length])
top (
quantity
orfloat
, default:10 km.
) – Atmosphere’s top altitude.Unit-enabled field (default: ucc[length]).
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 ucc[collision_coefficient]
) – 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
geometry (
AtmosphereGeometry
orNone
) – Parameters defining the basic geometry of the atmosphere.sigma_s (
Spectrum
orfloat
) – Atmosphere scattering coefficient value.sigma_a (
Spectrum
) – Atmosphere absorption coefficient value.phase (
PhaseFunction
) – Scattering phase function.
- 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_shape(ctx)#
Return the shape enclosing the atmosphere’s volume.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
shape (
CuboidShape
orSphereShape
) – Computed shape used as the medium stencil for kernel dictionary generation.
- eval_sigma_a(spectral_ctx)[source]#
Return absorption coefficient.
- Parameters
spectral_ctx (
SpectralContext
) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).- Returns
quantity
– Absorption coefficient.
- eval_sigma_s(spectral_ctx)[source]#
Return scattering coefficient.
- Parameters
spectral_ctx (
SpectralContext
) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).- Returns
quantity
– Scattering coefficient.
- eval_sigma_t(spectral_ctx)[source]#
Return extinction coefficient.
- Parameters
spectral_ctx (
SpectralContext
) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode).- Returns
quantity
– Extinction coefficient.
- kernel_dict(ctx)#
Return a dictionary suitable for kernel scene configuration.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
KernelDict
– Kernel dictionary which can be loaded as a Mitsuba object.
- kernel_media(ctx)[source]#
Return medium plugin specifications only.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
kernel_dict (
KernelDict
) – A kernel dictionary containing all the media attached to the atmosphere.
- kernel_phase(ctx)[source]#
Return phase function plugin specifications only.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
kernel_dict (
KernelDict
) – A kernel dictionary containing all the phase functions attached to the atmosphere.
- kernel_shapes(ctx)#
Return shape plugin specifications only.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
kernel_dict (
KernelDict
) – A kernel dictionary containing all the shapes attached to the atmosphere.
- kernel_width_plane_parallel(ctx)#
When using a plane parallel geometry, compute the size of the cuboid shape enclosing the participating medium representing the atmosphere.
- Parameters
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns
width (
quantity
) – Computed cuboid width, eval to10 / self.eval_mfp(ctx)
if ` self.geometry.width` is set toAUTO
,self.geometry.width
otherwise.- Raises
ValueError – When a geometry other than
PlaneParallelGeometry
is used.
- property bottom#
Atmosphere bottom altitude.
- Type
- property height#
Atmosphere height.
- Type
- property top#
Atmosphere top altitude.
- Type