QuantityAggregation

compartment_model.QuantityAggregation(
    self,
    ipm,
    selection,
    grouping,
    aggregation,
)

A kind of QuantityStrategy describing a group-and-aggregate operation on IPM quantities, with an optional sub-selection.

Typically you will create one of these by calling methods on a QuantitySelector instance.

QuantityAggregation is a frozen dataclass.

Parameters

ipm: BaseCompartmentModel

The original IPM quantity information.

selection: NDArray[np.bool_]

A boolean mask for selection of a subset of quantities.

grouping: QuantityGrouping

A method for grouping IPM quantities.

aggregation: QuantityAggMethod

A method for aggregating the quantity groups.

Attributes

ipm: BaseCompartmentModel

The original IPM quantity information.

selection: NDArray[np.bool_]

A boolean mask for selection of a subset of quantities.

grouping: QuantityGrouping

A method for grouping IPM quantities.

aggregation: QuantityAggMethod

A method for aggregating the quantity groups.

quantities: Sequence[CompartmentDef | EdgeDef]

The quantities in the result. If the strategy performs grouping these may be pseudo-quantities made by combining the quantities in the group.

labels: Sequence[str]

Labels for the quantities in the result, after any grouping.