QuantityStrategy
self, ipm, selection, grouping, aggregation) compartment_model.QuantityStrategy(
A strategy for dealing with the quantity axis, e.g., in processing results. Quantities here are an IPM’s compartments and events. Strategies can include selection of a subset, grouping, and aggregation.
Typically you will create one of these by calling methods on a QuantitySelector
instance.
QuantityStrategy 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 | None
-
A method for grouping IPM quantities.
aggregation: QuantityAggMethod | None
-
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 | None
-
A method for grouping IPM quantities.
aggregation: QuantityAggMethod | None
-
A method for aggregating the quantity groups.
selected: Sequence[Quantity]
-
The quantities from the IPM which are selected, prior to any grouping.
quantities: Sequence[Quantity]
-
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.