Record the pipeline's scientific decisions in astra.yaml - #875
Draft
cailmdaley wants to merge 1 commit into
Draft
Conversation
ShapePipe's scientific choices — detection thresholds, masking geometry, star selection, PSF model, ngmix priors and seeding, flag semantics, completeness floors — live in code and committed configs with their reasoning nowhere, or spread across PRs, papers and comments. astra.yaml gathers them: 50 decisions across eight sub-analyses, each with its rationale, the alternatives that were rejected and why, and a greppable anchor back to the code or config that implements it. universes/committed.yaml pins the option this branch selects for every one. The record is ASTRA (astra-tools; `uvx astra-tools@0.2.17 guide`), applied here at codebase level rather than to a single analysis. Conventions are stated in the file's header: anchors as `path::symbol` / `path#SECTION.KEY` and never line numbers, [HARDCODED] for a scientific value with no config exposure, [LINT] for a place where the record and the code — or the code and itself — disagree, [PENDING #NNN] for state not yet on develop. Authoring it surfaced nine such lints, two of which #873 fixes, and mapped ten places where the published Guinot+22 / Farrens+22 descriptions have drifted from the code since publication; 16 decisions carry verbatim paper quotes as prior insights. CLAUDE.md gains the standing instruction: a scientific change is not finished until the record is, amended in the same PR. The membership test is whether a different defensible choice would change which objects enter the shear catalogue, or the numbers attached to them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2muA2sRojbxRNxU2SKQeP
cailmdaley
marked this pull request as draft
August 31, 2026 01:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #852 (base is
feat/snakemake-orchestration, since the record anchors intoworkflow/config/cfis/*). Documentation only — no code, no config, no behaviour change.What
astra.yamlat the repo root records the scientific decisions embedded in ShapePipe's code and committed configs: 50 decisions across eight sub-analyses (masking, detection, preparation, star selection + PSF, shape measurement, PSF diagnostics, survey geometry, catalogue assembly), plus four cross-cutting ones. Each carries its rationale, the alternatives that were considered and why they were rejected, and an anchor back to the code or config that implements it.universes/committed.yamlpins the option this branch selects for every decision.The format is ASTRA (
uvx astra-tools@0.2.17 guide), applied at codebase level rather than to a single analysis.uvx astra-tools@0.2.17 validatepasses on both files; all 146 anchors resolve.Conventions live in the file's own header. In short: anchors are
path::symbolorpath#SECTION.KEYand never cite line numbers;[HARDCODED]marks a scientific value with no config exposure;[LINT]marks a place where the record and the code — or the code and itself — disagree;[PENDING #NNN]marks state not yet ondevelop.Why it is worth reading
Writing it was not a documentation exercise. It surfaced:
rand_splitin setools, and the 22-vs-20STAR_THRESHmismatch between PSF validation and science interpolation). The other seven stand, e.g.final_cat.paramrequestingIMAFLAGS_ISOthe merged catalogue never receives; the documented-but-unimplementedTILE_LISToverlap flagging; additive rather than bitwise mask-plane combination.[HARDCODED]values — scientific numbers with no config exposure, including PSFEx's compiled-inSAMPLE_AUTOSELECTdefaults, which are a second star selection no config records.DETECT_MINAREA10→5,DEBLEND_MINCONT0.001→0.0005 on tiles, tile background AUTO→MANUAL 0, in-line spread-model classification disabled and deferred downstream, HSM moment initialisation→WCS centroids, ...). 16 decisions carry verbatim quotes from those papers as prior insights, machine-verified against the PDFs.The standing instruction
CLAUDE.mdgains a section stating that a scientific change is not finished until the record is — amended in the same PR. The membership test: would a different defensible choice change which objects enter the shear catalogue, or the numbers attached to them? Detection thresholds, masking geometry, star cuts, PSF degree, ngmix priors, flag semantics, completeness floors are in; manifest sentinels, chunk sizes, allocation strategy, directory layout are out.Open for discussion
anchorfield would be an upstream astra-spec change.psf_diagnostics,survey_geometry) are thin: the committed Snakemake chain runs neither.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y2muA2sRojbxRNxU2SKQeP