eradiate.experiments.AtmosphereExperiment#
- class eradiate.experiments.AtmosphereExperiment(measures=NOTHING, integrator=AUTO, results=NOTHING, background_spectral_grid=AUTO, ckd_quad_config=NOTHING, extra_objects=None, illumination=NOTHING, kdict=NOTHING, kpmap=NOTHING, geometry='plane_parallel', atmosphere=NOTHING, surface=NOTHING)[source]#
Bases:
EarthObservationExperiment
Simulate radiation in a one-dimensional scene. This experiment approximates a one-dimensional setup using a 3D geometry set up to reproduce the effect of invariances typical of 1D geometries. It supports the so-called plane parallel and spherical shell geometries.
- Parameters:
measures (
list
ofMeasure
orlist
ofdict
orMeasure
ordict
, default:MultiDistantMeasure()
) – List of measure specifications. The passed list may contain dictionaries, which will be interpreted bymeasure_factory
. Optionally, a singleMeasure
or dictionary specification may be passed and will automatically be wrapped into a list.integrator (
Integrator
ordict
orAUTO
, default:AUTO
) – Monte Carlo integration algorithm specification. This parameter can be specified as a dictionary which will be interpreted byintegrator_factory
.The integrator defaults toAUTO
, which will choose the appropriate integrator depending on the experiment’s configuration.background_spectral_grid (
SpectralGrid
orAUTO
, default:AUTO
) – Background spectral grid. If the value isAUTO
, the background spectral grid is automatically generated depending on the active mode and internal experiment constraints. Otherwise, the value must be convertible to aSpectralGrid
instance.ckd_quad_config (
CKDQuadConfig
ordict
) – CKD quadrature rule generation configuration.extra_objects (
dict
orNone
, default:None
) – Dictionary of extra objects to be added to the scene. The keys of this dictionary are used to identify the objects in the kernel dictionary.illumination (
DirectionalIllumination
orConstantIllumination
ordict
, default:DirectionalIllumination()
) – Illumination specification. This parameter can be specified as a dictionary which will be interpreted byillumination_factory
.kdict (mapping, default:
{}
) – Additional kernel dictionary template appended to the experiment-controlled template.kpmap (mapping, default:
{}
) – Additional scene parameter update map template appended to the experiment-controlled template.geometry (
str
ordict
orSceneGeometry
, default:"plane_parallel"
) – Problem geometry. Can be specified as a simple string ("plane_parallel" or "spherical_shell"
), a dictionary interpreted bySceneGeometry.convert()
, or aSceneGeometry
instance.atmosphere (
Atmosphere
ordict
orNone
, default:HomogeneousAtmosphere()
) – Atmosphere specification. If set toNone
, no atmosphere will be added. This parameter can be specified as a dictionary which will be interpreted byatmosphere_factory
.surface (
BasicSurface
orBSDF
ordict
, optional, default:BasicSurface(bsdf=LambertianBSDF())
) – Surface specification. If set toNone
, no surface will be added. This parameter can be specified as a dictionary which will be interpreted bysurface_factory
andbsdf_factory
.
- Fields:
measures (
list
ofMeasure
) – List of measure specifications.integrator (
Integrator
orAUTO
) – Monte Carlo integration algorithm specification.ckd_quad_config (
CKDQuadConfig
) – CKD quadrature rule generation configuration.extra_objects (
dict
) – Dictionary of extra objects to be added to the scene.illumination (
AbstractDirectionalIllumination
orConstantIllumination
) – Illumination specification.kdict (
KernelDictTemplate
) – Additional kernel dictionary template appended to the experiment-controlled template.kpmap (
UpdateMapTemplate
) – Additional scene parameter update map template appended to the experiment-controlled template.geometry (
PlaneParallelGeometry
orSphericalShellGeometry
) – Problem geometry.atmosphere (
Atmosphere
orNone
) – Atmosphere specification.surface (
BasicSurface
orNone
) – Surface specification.
Notes
A post-initialization step will constrain the measure setup if a distant measure is used and set the target to [0, 0, 0].
This experiment supports arbitrary measure positioning, except for
MultiRadiancemeterMeasure
, for which subsensor origins are required to be either all inside or all outside of the atmosphere. If an unsuitable configuration is detected, aValueError
will be raised during initialization.
- clear()#
Clear previous experiment results and reset internal state.
- init()#
Generate kernel dictionary and initialize Mitsuba scene.
- pipeline(measure)#
Return the post-processing pipeline for a given measure.
- process(spp=0, seed_state=None)#
Run simulation and collect raw results.
- Parameters:
- spectral_indices(measure_index)#
Generate spectral indices for a given measure.
- Parameters:
measure_index (
int
) – Measure index for which spectral indices are generated.- Yields:
SpectralIndex
– Spectral index.
- property ckd_quads#
A dictionary mapping measure index to the associated CKD quadrature rule (if relevant).
- property context_init#
Return a single context used for scene initialization.
- property contexts#
Return a list of contexts used for processing.
- property results#
Post-processed simulation results.
- Returns:
dict[str
,Dataset]
– Dictionary mapping measure IDs to xarray datasets.
- property scene#
Return a scene object used for kernel dictionary template and parameter table generation.
- property spectral_grids#
A dictionary mapping measure index to the associated spectral grid.