feat(demos): end-to-end demonstrations that recover input traps + cold front door (Phase 4)#4
Merged
Merged
Conversation
…+ cold front door (Phase 4)
The demonstrations that prove the assistant works, each run for real against the
live stack (arctic clocking, real Nautilus fits) and each asserting its result.
scripts/demonstrations/
demo_1_calibrate_1d — simulate a 1D dataset from known traps, fit, recover
the input: density 0.1300->0.1323, release 1.25->1.261
demo_2_calibrate_imaging_ci — the same in the 2D charge-injection geometry
(Clocker2D): density 0.1300->0.1334, release 1.25->1.312
demo_3_correct_1d — clocker.remove_cti suppresses the EPER trail 3.9x
demo_4_aggregate_results — reload demo 1 through the aggregator; model round-trips
Two caught real issues, fixed honestly rather than papered over:
- demo 4: a factor-graph fit stores results per-factor, so the aggregator's
reloaded instance is indexed (instance[0].cti...), not the single-analysis
layout ac.agg.CTIAgg / max_log_likelihood_instance assume.
- demo 2: an over-trimmed first version (2 noisy injection levels) recovered
density but not release timescale (1.25->2.90) — a genuine under-constraint,
so the data was fixed (three cleaner levels, more live points), not the
assertion loosened.
llms.txt — de-lensed the cold-session front door: it described the assistant as
"for doing strong-lens science" and able to "explain lensing"; now it frames CTI
calibration and routes to the CTI reference + the demonstrations. The two
cold-start questions (install, calibration) are answerable from the repo alone.
Validation: --scope all / --check-citations / --lint-idioms / --check-provenance
/ --check-version all pass.
Part of #136 (Phase 4). scripts/AGENTS.md still carries lensing SLaM content — a
bigger CTI-pipeline rewrite, flagged with the systemic boundary finding on #136.
The public flip is left for explicit human approval.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Phase 4 of the autocti_assistant epic (PyAutoBrain#136). The demonstrations that
prove the assistant works — and the cold-session front door that makes it usable.
Four runnable demonstrations (
scripts/demonstrations/)Each is small enough to run on a laptop in minutes, and each asserts its
result — a clean run is proof the pipeline works, not just that it executes. All
were run for real against the live stack (arctic clocking, real Nautilus fits):
demo_1_calibrate_1ddemo_2_calibrate_imaging_ciClocker2D)demo_3_correct_1dclocker.remove_ctisuppresses the EPER traildemo_4_aggregate_resultsTwo of these caught real issues that I fixed rather than papered over:
ac.agg.CTIAggandmax_log_likelihood_instanceassume the single-analysis model layout; afactor-graph fit stores results per-factor, so the reloaded instance is
indexed (
instance[0].cti...). Demo 4 uses the samples-based path that works.levels) recovered the density but not the release timescale (1.25 → 2.90).
That's a genuine under-constraint, not a tolerance issue, so I fixed the data
(three cleaner injection levels, more live points) rather than loosen the
assertion.
Cold-session front door
Fixed
llms.txt— the file a fresh chat session reads to bootstrap. It describedthe assistant as "for doing strong-lens science" and told agents it could
"explain lensing"; now it correctly frames CTI calibration and routes to the
CTI reference. The two canonical cold-start questions are answerable from the repo
alone: install (the arcticpy recipe in
ac_setup_environment) andcalibration (
ac_fit_cti_model+ the calibration-strategy wiki).Validation
--scope all·--check-citations·--lint-idioms·--check-provenance·--check-versionall pass.wiki-currencyshould stay green;boundaryskips.Remaining lensing leak (systemic, flagged not fixed here)
scripts/AGENTS.mdstill describes lensing SLaM pipelines (/init-slam, MGElens light, pixelised source) — it needs a real CTI-pipeline rewrite, which is
beyond a demonstrations PR. It's part of the same reference-side boundary finding
already on #136 (generic files that absorbed lensing content: the audit's
autogalaxy, the PyPI-install shape,
_bootstrap_skill.md, and nowscripts/AGENTS.md).Publish gate — legs 1–4
Legs 1–3 stay green; the demonstrations and the cold-front-door fix are the
substance of leg 4. The final act — flipping the repo public — is left for
explicit human approval and is not done in this PR.
Part of #136 (Phase 4, the last phase).