Problem
sp_validation config is spread across three overlapping surfaces, and no single one owns a given parameter.
config/calibration/mask_v1.X.*.yaml — 12 near-duplicate files. Each catalogue version has its own masking/calibration config. Most differ from the previous only by a version comment and one flag value (for example FLAGS <= 2 vs <= 3). Copy-paste drift is already visible: label formatting is inconsistent between files (r"$n_{\rm epoch}$" vs $n_{\rm epoch}$). Nothing in the workflow selects these; catalog_builders.py reads one when invoked by hand, and a test only checks the paths exist.
cosmo_val/cat_config.yaml holds per-catalogue metadata: input paths, column names, and survey parameters (A, n_e, n_psf, sigma_e under cov_th).
papers/*/config/config.yaml holds the Snakemake config: versions, a fiducial: block, scale cuts, and cosmology parameters. The cosmo_val config documents in a comment that several top-level keys exist only to satisfy parse-time lookups of the shared workflow module and "are not exercised by the cosmo_val rules themselves."
The same physical quantity can live in two places. A survey area or sigma_e is declared in cat_config and can be re-declared in the workflow config. There is no rule for which wins.
Proposed philosophy (for discussion)
- One source of truth per parameter. A value is declared once. Every other surface references it, never restates it.
cat_config.yaml owns catalogue facts — paths, column names, and per-catalogue survey parameters (area, number densities, sigma_e). The workflow pulls these at parse time instead of hardcoding them.
- The workflow owns one fiducial config. A single
fiducial: block sets the default run (version, binning, scale cuts, cosmology). Grid or comparison runs are declared as overrides on top of the fiducial, not as parallel full configs.
- Mask/calibration cuts get one templated config, not one file per version. The cuts that are actually constant across versions live once; only the genuine per-version deltas are expressed as a diff or override.
Cleanup tasks
Open questions
- Are all 12 mask configs live, or are early versions dead? (Only
catalog_builders.py and a path test touch them.)
- Do we want a schema (pydantic / jsonschema) to enforce the ownership rule, or is convention + README enough?
- Fiducial-plus-overrides: express overrides in YAML anchors, a config-merge layer, or Snakemake
configfile composition?
— Claude, on behalf of Cail
Problem
sp_validationconfig is spread across three overlapping surfaces, and no single one owns a given parameter.config/calibration/mask_v1.X.*.yaml— 12 near-duplicate files. Each catalogue version has its own masking/calibration config. Most differ from the previous only by a version comment and one flag value (for exampleFLAGS <= 2vs<= 3). Copy-paste drift is already visible: label formatting is inconsistent between files (r"$n_{\rm epoch}$"vs$n_{\rm epoch}$). Nothing in the workflow selects these;catalog_builders.pyreads one when invoked by hand, and a test only checks the paths exist.cosmo_val/cat_config.yamlholds per-catalogue metadata: input paths, column names, and survey parameters (A,n_e,n_psf,sigma_eundercov_th).papers/*/config/config.yamlholds the Snakemake config:versions, afiducial:block, scale cuts, and cosmology parameters. Thecosmo_valconfig documents in a comment that several top-level keys exist only to satisfy parse-time lookups of the shared workflow module and "are not exercised by the cosmo_val rules themselves."The same physical quantity can live in two places. A survey area or
sigma_eis declared incat_configand can be re-declared in the workflow config. There is no rule for which wins.Proposed philosophy (for discussion)
cat_config.yamlowns catalogue facts — paths, column names, and per-catalogue survey parameters (area, number densities,sigma_e). The workflow pulls these at parse time instead of hardcoding them.fiducial:block sets the default run (version, binning, scale cuts, cosmology). Grid or comparison runs are declared as overrides on top of the fiducial, not as parallel full configs.Cleanup tasks
mask_v1.X.*.yamlfiles into one base + per-version overrides (or confirm which are dead and remove them).cat_configrather than restating them.Open questions
catalog_builders.pyand a path test touch them.)configfilecomposition?— Claude, on behalf of Cail