class eradiate.experiments.CanopyAtmosphereExperiment(measures=_Nothing.NOTHING, results=_Nothing.NOTHING, default_spectral_set=AUTO, quad_spec=_Nothing.NOTHING, extra_objects=None, illumination=_Nothing.NOTHING, geometry='plane_parallel', atmosphere=_Nothing.NOTHING, canopy=None, padding=0, surface=_Nothing.NOTHING, integrator=AUTO)[source]#

Bases: EarthObservationExperiment

Simulate radiation in a scene with an explicit canopy and atmosphere. This experiment assumes that the surface is plane and accounts for ground unit cell padding.

  • measures (list of Measure or list of dict or Measure or dict, default: MultiDistantMeasure()) – List of measure specifications. The passed list may contain dictionaries, which will be interpreted by measure_factory. Optionally, a single Measure or dictionary specification may be passed and will automatically be wrapped into a list.

  • default_spectral_set (BinSet or WavelengthSet or AUTO, default: AUTO) – Default spectral set. This attribute is used to set the default value for spectral_set.If the value is AUTO, the default spectral set is selected based on the active mode. Otherwise, the value must be a BinSet or WavelengthSet instance.

  • extra_objects (dict or None, 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 or dict, default: DirectionalIllumination()) – Illumination specification. This parameter can be specified as a dictionary which will be interpreted by illumination_factory.

  • geometry (str or dict or PlaneParallelGeometry, default: "plane_parallel") – Problem geometry.

  • atmosphere (Atmosphere or dict or None, optional, default: HomogeneousAtmosphere()) – Atmosphere specification. If set to None, no atmosphere will be added. This parameter can be specified as a dictionary which will be interpreted by atmosphere_factory.

  • canopy (Canopy or dict or None, optional, default: None) – Canopy specification. This parameter can be specified as a dictionary which will be interpreted by biosphere_factory.

  • padding (int, optional, default: 0) – Padding level. The canopy will be padded with copies to account for adjacency effects. This, in practice, has effects similar to making the scene periodic.A value of 0 will yield only the defined scene. A value of 1 will add one copy in every direction, yielding a 3×3 patch. A value of 2 will yield a 5×5 patch, etc. The optimal padding level depends on the scene.

  • surface (Surface or BSDF or dict or None, optional, default: BasicSurface(bsdf=LambertianBSDF())) – Surface specification. A Surface object may be passed: its shape specifications will be bypassed and the surface size will be computed automatically upon kernel dictionary generation. A BSDF may also be passed: it will be wrapped automatically in a BasicSurface instance. If a dictionary is passed, it will be first interpreted as a BSDF; if this fails, it will then be interpreted as a Surface. Finally, this field can be set to None: in that case, no surface will be added.

  • integrator (Integrator or dict or AUTO, default: AUTO) – Monte Carlo integration algorithm specification. This parameter can be specified as a dictionary which will be interpreted by IntegratorFactory.convert().If set to AUTO, the integrator will be set depending on the presence of an atmosphere.If an atmosphere is defined the integrator defaults to VolPathIntegrator`otherwise a :class:.PathIntegrator` will be used.



  • Canopy padding is controlled using the padding parameter: do not pad the canopy itself manually.


  • A post-initialisation step will constrain the measure setup if a distant measure is used and no target is defined:

    • if a canopy is defined, the target will be set to the top of the canopy unit cell (i.e. without its padding);

    • if no canopy is defined, the target will be set according to the atmosphere (i.e. to [0, 0, toa] where toa is the top-of-atmosphere altitude);

    • if neither atmosphere nor canopy are defined, the target is set 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, a ValueError will be raised during initialization.

  • Currently this experiment is limited to the plane-parallel geometry.


Clear previous experiment results and reset internal state.


Generate kernel dictionary and initialise Mitsuba scene.


Return the post-processing pipeline for a given measure.


measure (Measure or int) – Measure for which the pipeline is generated.




Post-process raw results and store them in results.

process(spp=0, seed_state=None)#

Run simulation and collect raw results.

  • spp (int, optional) – Sample count. If set to 0, the value set in the original scene definition takes precedence.

  • seed_state (SeedState, optional) – Seed state used to generate seeds to initialize Mitsuba’s RNG at every iteration of the parametric loop. If unset, Eradiate’s root seed state is used.


Generate spectral indices for a given measure.


measure_index (int) – Measure index for which spectral indices are generated.


SpectralIndex – Spectral index.

property context_init#

Return a single context used for scene initialization.

property contexts#

Return a list of contexts used for processing.

property integrator#

Integrator used to solve the radiative transfer equation.



property results#

Post-processed simulation results.


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_set#

A dictionary mapping measure index to the associated spectral set.