pdstools.adm.trees._agb

Datamart-level AGB discovery helper.

Attributes

Classes

AGB

Datamart helper for discovering and extracting AGB models.

Module Contents

logger
class AGB(datamart: pdstools.adm.ADMDatamart.ADMDatamart)

Datamart helper for discovering and extracting AGB models.

Reachable as ADMDatamart.agb; not intended to be instantiated directly.

Parameters:

datamart (pdstools.adm.ADMDatamart.ADMDatamart)

datamart
discover_model_types(df: polars.LazyFrame, by: str = 'Configuration') dict[str, str]

Discover the type of model embedded in the Modeldata column.

Groups by by (typically Configuration, since one model rule contains one model type) and decodes the first Modeldata blob per group to extract its _serialClass.

Parameters:
  • df (pl.LazyFrame) – Datamart slice including Modeldata. Collected internally.

  • by (str) – Grouping column. Configuration is recommended.

Return type:

dict[str, str]

get_agb_models(last: bool = False, n_threads: int = 6, query: pdstools.utils.types.QUERY | None = None) dict[str, pdstools.adm.trees._multi.MultiTrees]

Get all AGB models in the datamart, indexed by Configuration.

Filters down to models whose _serialClass ends with GbModel and decodes them via MultiTrees.

Parameters:
  • last (bool) – If True, use only the latest snapshot per model.

  • n_threads (int) – Worker count for parallel blob decoding.

  • query (QUERY | None) – Optional pre-filter applied before discovery.

Return type:

dict[str, pdstools.adm.trees._multi.MultiTrees]