darsia.ExtrudedPorousGeometry#

class ExtrudedPorousGeometry(porosity, depth, space_dim, num_voxels, dimensions=None, voxel_size=None, **kwargs)[source]#

Bases: WeightedGeometry

Class 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:
porosityfloat or array

Porosity.

depthfloat or array

Effective depth.

space_dimint

See Geometry.

num_voxelstuple

See Geometry.

dimensionslist

See Geometry.

voxel_sizelist

See Geometry.

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

weight

Weight of the geometry, a scalar or an array (NaN replaced by zero).

porosity

Porosity (referenced).

depth

Depth (referenced).

voxel_volume

Effective voxel volume in 3d.

cached_voxel_volume

Voxel volume for data of the current shape (the voxel volume itself, or a resized one, see _prepare_cached_voxel_volume).

space_dim

Spatial dimension of geometry.

num_voxels

Number of voxels in each spatial direction.

voxel_size

Dimensions of a single voxel.

dimensions

Dimensions 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:
depthfloat or array

Effective depth.

Raises:
NotImplementedError

Always; build a new geometry instead.

depth#

Depth (referenced).

porosity#

Porosity (referenced).