Products of scales
Several scales as one multi-index.
scale_product
scale_product(
name: str = "",
desc: str = "",
keys: Mapping[str, str] | None = None,
joint_weights: Any = None,
**axes: NestedScale,
) -> ScaleProduct
Combine named scales into a product: scale_product(time=cal, space=gs).
Keys default to each axis's own key; when two collide, the axis names.
ScaleProduct
dataclass
Named axes (each a named NestedScale) and one data key column per axis.
scale_axes
scale_axes(x: ScaleProduct, axis: str | None = None)
All axes (name -> scale), or one axis.
product_size
product_size(x: ScaleProduct) -> dict[str, Any]
Atoms per axis and the size of the (never materialised) product.
product_keys
product_keys(x: ScaleProduct) -> dict[str, str]
Axis -> data key column.
product_frames
product_frames(x: ScaleProduct) -> dict[str, list[str]]
product_weights
product_weights(x: ScaleProduct) -> dict[str, list[str]]
product_coverage
product_coverage(
x: ScaleProduct, weight: str | None = None
) -> dict[str, float]