Repository navigation
Conversation
wint3ria
force-pushed
the
partlay3d
branch
3 times, most recently
from
August 13, 2026 19:56
a4bbd95 to
3c3340d
Compare
This support is enabled in the ParticleProperties class itself and its conversion function. ParticleProperties can now encapsulate aer_v2 or prt_v1 formatted dataset
netCDF4's C extension mutates an array's .shape attribute in place when writing datasets, which NumPy 2.5 now deprecates. This turns into a hard test failure since filterwarnings = ["error"]. Unrelated to any of our changes; affects the whole regression suite.
Introduces two new modules that together replace the old ZGrid altitude-only facility with a proper grid abstraction usable by both plane-parallel and spherical-shell geometries: - eradiate.grid: GridCoords and its PlaneParallelGridCoords / SphericalShellGridCoords subclasses, describing an atmosphere's spatial extent and discretization in 3D. The coordinates are regular in all 3 dimensions. - eradiate.scenes._gridvolume: generate_gridvolume(), factorizing the Mitsuba gridvolume/sphericalcoordsvolume dictionary construction that used to be hand-rolled (and duplicated per geometry type) in AtmosphericMedium._template_medium/_params_medium.
…mosphere stack Migrates every remaining ZGrid consumer onto the grid foundation and gridvolume facility introduced in the previous commit: AbstractHeterogeneousAtmosphere and its concrete subclasses (HeterogeneousAtmosphere, MolecularAtmosphere, ParticleLayer) all accept and forward a `grid` argument through their eval_albedo/ eval_sigma_t/eval_sigma_a/eval_sigma_s methods instead of `zgrid`, and radprops mirrors the same signatures for RadProfile. Adds test coverage for radprops._atmosphere's grid-shape validation and level-to-layer averaging helpers (_validate_thermoprops_grid_shape, _average_adjacent_levels, _layers_from_levels), generalized here to x/y/z rather than z only.
…metries for notebook cells rendering Provide a small module that render a schematic vizualisation of grids and geometries for notebook representation. It only uses base libraries and does not perform expensive matplotlib operation. Generating the SVG is done using the xml module. The rendering is the cost of the xml serialization and HTML render in the browser.
…volume facility This introduces eradiate.scenes.phase._multi.MultiPhaseFunction, a replacement for the deprecated BlendPhaseFunction, and removes _blend.py entirely. The new implementation blends an arbitrary number of phase function components using per-component weight grids instead of hand-rolling DictParameter/mi.VolumeGrid construction per geometry type. RayleighPhaseFunction is updated : its depolarization-factor volume construction now goes through generate_gridvolume() as well. HeterogeneousAtmosphere.phase is updated to build a MultiPhaseFunction instead of a BlendPhaseFunction for its multi-component case. Tests are updated for the new kernel parameter naming scheme.
Rename the class ParticleLayer (1D concept) to ParticleEnsemble. Ensemble refers to the common physical properties of the particles, while their optical thickness and spatial extent may vary in 3D. ParticleEnsemble.bottom .top and .tau_ref can now vary spatially across a horizontal 2D plane. - eval_fractions computes, for each horizontal cell, an independent 1D vertical fraction profile using that cell's own bottom/top/tau_ref, normalizing per-column rather than globally. - _eval_albedo_impl/_eval_sigma_t_impl/_eval_sigma_s_impl/ _eval_sigma_a_impl are rewritten around broadcasting instead of the 1D assumptions. - ArrayParticleDistribution now accepts 3D arrays (one distribution per horizontal cell) - validators.is_positive now broadcasts over array-valued fields instead of assuming a scalar.
wint3ria
marked this pull request as ready for review
August 24, 2026 16:48
Contributor
Author
|
Closed to prefer a stacked PR structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adapt the
ParticleLayerclass to 3D grids. The class is now namedParticleEnsemble, referring the the unique distribution of particles shape shape they represent. This class can now handles variability in its geometry and OT alongside the X and Y coordinates of the scene.The vertical extent of the

ParticleEnsemblecan varyOptical thickness can accept a 2D array of the shape of the grid's X and Y coordinates

ArrayDistributionclass is also adapted to support X and Y dimensionsThis class can be used for parametric configuration of 3D particles plumes geometry. Examples taken from eradiate/eradiate-tutorials#5
Checklist
mainbranch