QuantityGroup
self, ipm, selection, grouping, aggregation) compartment_model.QuantityGroup(
A kind of QuantityStrategy
describing a group operation on IPM quantities, with an optional sub-selection.
Typically you will create one of these by calling methods on a QuantitySelector
instance.
QuantityGroup 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.
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.
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.
Methods
Name | Description |
---|---|
agg |
Combine grouped quantities using the named aggregation. |
sum |
Combine grouped quantities by adding their values. |