itasc.contact_analysis.config¶
The TOML run-config — Contact Analysis’s hand-authored knob file.
One small file, authored once and git-versioned (it carries code status, per the
artifact-contract spec §1): it names the per-position catalog CSV, selects
which quantities to compute, and supplies the shared build params.
Everything in it is a run-level choice — the
per-position table itself stays a CSV (tabular, many-row, with its own
relative-path resolution); this file is the “author once, then run” surface a
single run(config) entry point consumes.
The run produces label-agnostic tidy tables only; no classification step and no plot/figure export live here (a subpopulation classification and any plots are a downstream, dataset-specific concern).
Paths resolve relative to the config file’s own directory, so a project folder is
relocatable: keep config.toml next to catalog.csv and the whole thing moves
together.
Functions
|
Parse the TOML run-config at config_path into a |
|
Author a TOML run-config at path — the inverse of |
Classes
|
A parsed run-config. |
- class itasc.contact_analysis.config.RunConfig(catalog, out_dir=None, quantities=(), params=<factory>)[source]¶
Bases:
objectA parsed run-config. Paths are absolute (resolved against the config dir).
quantities empty means “every available quantifier”; a non-empty tuple selects a subset by
quantity_id(dependency producers are pulled in at run time even when omitted). params is the shared build-knob mapping threaded to quantifiers that opt in. out_dir is where the pooled tidy tables land (flat);Nonedefaults to the catalogue root (the positions’ common ancestor).
- itasc.contact_analysis.config.load_config(config_path)[source]¶
Parse the TOML run-config at config_path into a
RunConfig.catalogis required. Relative paths resolve against the config file’s directory. Selectedquantitiesare validated against the registered quantifiers so a typo fails loudly rather than silently computing nothing.
- itasc.contact_analysis.config.write_config(path, *, catalog='catalog.csv', out_dir=None, quantities=(), params=None)[source]¶
Author a TOML run-config at path — the inverse of
load_config().Paths are written relative (verbatim), so the project folder stays relocatable.
out_dir(where the flat tables land) is emitted only when given.quantitiesis emitted only when non-empty (empty round-trips to()= “all”).paramskeys that areNoneare dropped (an unset pixel size etc.).load_config(write_config(path, ...))reproduces the inputs (paths resolved againstpath.parent). Returns path.