darsia.ExtrudedPorousGeometry#
- class ExtrudedPorousGeometry(porosity, depth, space_dim, num_voxels, dimensions=None, voxel_size=None, **kwargs)[source]#
Bases:
WeightedGeometryClass containing information of a porous geometry.
The pore volume of a voxel is its area times porosity times depth. Porosity and depth are referenced, not copied, and must not be changed afterwards: the weight (porosity times depth) is computed from them whenever it is asked for, while the voxel volumes are computed once.
Constructor for extruded, porous, two-dimensional geometry.
- Parameters:
Methods
integrate(data)Integrate data over the entire geometry.
make_extensive(data)Convert intensive values to integrated per-cell values on geometry grid.
normalize(img, img_ref[, return_ratio])Normalize image with respect to another one, such that both have the same integral.
subregion(roi)Extract subregion of the geometry.
update(depth)Change the depth (not available).
voxel_volumes(shape)Voxel volumes with which integrate weights data of the given shape.
Attributes
weightWeight of the geometry, a scalar or an array (NaN replaced by zero).
Porosity (referenced).
Depth (referenced).
voxel_volumeEffective voxel volume in 3d.
cached_voxel_volumeVoxel volume for data of the current shape (the voxel volume itself, or a resized one, see _prepare_cached_voxel_volume).
space_dimSpatial dimension of geometry.
num_voxelsNumber of voxels in each spatial direction.
voxel_sizeDimensions of a single voxel.
dimensionsDimensions of geometry.
- update(depth)[source]#
Change the depth (not available).
A new depth would have to reach everything derived from the geometry: the voxel volumes (area times porosity times depth, with NaN as in the constructor, not by dividing by the old weight, which is zero where the porosity is), the voxel volumes resized for data of other shapes, region geometries (
subregion()) and reduced copies (e.g. of the calibration). For a calibration of the depth, note that a global factor cannot be told apart from the scaling of the signal; a depth model with a few parameters can.- Parameters:
- Raises:
NotImplementedErrorAlways; build a new geometry instead.
- depth#
Depth (referenced).
- porosity#
Porosity (referenced).