eradiate.scenes.atmosphere.HeterogeneousAtmosphere
eradiate.scenes.atmosphere.HeterogeneousAtmosphere#
- class eradiate.scenes.atmosphere.HeterogeneousAtmosphere(id='atmosphere', geometry=None, scale=None, molecular_atmosphere=None, particle_layers=_Nothing.NOTHING)[source]#
Bases:
eradiate.scenes.atmosphere._core.AbstractHeterogeneousAtmosphere
Heterogeneous atmosphere scene element [
heterogeneous
].- 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.scale (
float
, optional, default:None
) – If set, the extinction coefficient is scaled by the corresponding amount during computation.molecular_atmosphere (
MolecularAtmosphere
ordict
, optional, default:None
) – Molecular atmosphere. Can be specified as a dictionary interpreted byatmosphere_factory
; in that case, the"type"
parameter can be omitted and will automatically be set to ‘"molecular"
.particle_layers (
list
ofParticleLayer
, optional, default:[]
) – Particle layers. Can be specified as a dictionary interpreted byatmosphere_factory
; in that case, thetype
parameter can be omitted and will automatically be set toparticle_layer
.
- Fields
geometry (
AtmosphereGeometry
orNone
) – Parameters defining the basic geometry of the atmosphere.scale (
float
orNone
) – If set, the extinction coefficient is scaled by the corresponding amount during computation.molecular_atmosphere (
MolecularAtmosphere
orNone
) – Molecular atmosphere.particle_layers (
list
ofParticleLayer
) – Particle layers.
- 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_radprops(spectral_ctx, optional_fields=False)[source]#
Evaluate the extinction coefficients and albedo profiles.
- Parameters
spectral_ctx (
SpectralContext
) – A spectral context data structure containing relevant spectral parameters (e.g. wavelength in monochromatic mode, bin and quadrature point index in CKD mode).optional_fields (
bool
, optional, default:False
) – IfTrue
, extra the optionalsigma_a
andsigma_s
fields, not required for scene construction but useful for analysis and debugging.
- Returns
Dataset
– A dataset containing with the following variables for the specified spectral context:sigma_t
: extinction coefficient;albedo
: albedo.
Coordinates are the following:
z
: altitude.
- 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.
- 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)#
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
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