docs(simulators): mirror autogalaxy_workspace simulators + retarget tutorial subprocess paths#11
Merged
Merged
Conversation
…utorial subprocess paths
11 tutorials across chapters 1-4 subprocess to simulator paths that
don't exist in HowToGalaxy:
- 10 reference `scripts/imaging/simulator.py` (writes dataset `simple`)
- 1 references `scripts/guides/plot/simulator.py` (writes dataset `sersic_x2`)
Both are autogalaxy_workspace-style paths inherited when these
tutorials were originally adapted from that workspace. HowToGalaxy
has no equivalent local simulators, so every affected tutorial
exits 2 (file not found) during the subprocess auto-simulate step.
Retargeting to the existing `scripts/simulators/sersic.py` was
considered and rejected — its `simple__sersic` dataset is bulge-only
while several tutorials (e.g. `tutorial_3_realism_and_complexity.py`)
fit a bulge+disk model. Mirroring the matching workspace simulators
preserves model↔data integrity.
Two new files (verbatim copies):
- `scripts/simulators/simple.py` ← `autogalaxy_workspace/scripts/imaging/simulator.py`
- `scripts/simulators/sersic_x2.py` ← `autogalaxy_workspace/scripts/guides/plot/simulator.py`
11 mechanical one-line subprocess path edits in the affected tutorials.
No tutorial logic changes; the dataset names already used by the
tutorials (`simple`, `sersic_x2`) now match what the new local
simulators write.
Verified locally:
- `python scripts/simulators/simple.py` writes
`dataset/imaging/simple/{data.fits, noise_map.fits, psf.fits, ...}`.
- `python scripts/simulators/sersic_x2.py` writes
`dataset/imaging/sersic_x2/...`.
- `python scripts/chapter_1_introduction/tutorial_3_fitting.py` runs
to completion under `PYAUTO_TEST_MODE=2`.
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Eleven HowToGalaxy tutorials subprocess to autogalaxy_workspace-style paths that don't exist in this repo:
scripts/imaging/simulator.py→ datasetsimple(bulge+disk Sersic+Exponential)scripts/guides/plot/simulator.py→ datasetsersic_x2All fail with
CalledProcessError ... exit 2. NEEDS_FIX-parked 48 days.Mirror the matching workspace simulators into HowToGalaxy as local files and update the 11 tutorial subprocess paths. Two new files (verbatim copies), 11 one-line tutorial edits.
Why not retarget to existing sersic.py?
scripts/simulators/sersic.pywrites a bulge-only galaxy assimple__sersic. Tutorials liketutorial_3_realism_and_complexity.pyfitaf.Model(Galaxy, bulge=Sersic, disk=Exponential)— retargeting would leave the disk params unconstrained, NaN posteriors, and confuse readers. Mirroring the autogalaxy_workspace simulator preserves model↔data integrity.Test plan
python scripts/simulators/simple.pywritesdataset/imaging/simple/{data,noise_map,psf}.fits+ galaxies.json.python scripts/simulators/sersic_x2.pywritesdataset/imaging/sersic_x2/....PYAUTO_TEST_MODE=2 python scripts/chapter_1_introduction/tutorial_3_fitting.pyruns to completion.autobuild run_all howtogalaxy --timeout-secs 300flips the 11 affected tutorials from FAIL to PASS.Related
🤖 Generated with Claude Code