Example scripts and notebooks for modeling galaxy structure and morphology with PyAutoGalaxy. Start with an introductory example, then explore the tools for your own data.
- Try it in your browser — run the introductory notebook on Google Colab without installing anything.
- Run it locally — follow the installation guide, then open
start_here.ipynb. - Browse examples with images — read worked examples and view their results directly on GitHub.
See Find Your Examples below to choose where to start.
The PyAutoGalaxy AI Assistant helps you learn galaxy modeling, run examples and analyse your own data through conversation. Visit its README for setup instructions and a starting prompt.
Examples are available as Python scripts in scripts/ and Jupyter notebooks in notebooks/.
For a single galaxy, choose your data type below. To fit galaxies together, start with multi_galaxy/ for blended light or cluster/ for a cluster field.
Choose the example for your observations. Each folder has a start_here example to get you going.
Imaging![]() Fit images from Hubble, JWST and ground-based telescopes with imaging/. |
Interferometry![]() Fit radio and submillimetre observations with interferometer/. |
Multi-band Imaging![]() Fit several wavebands together with multi_dataset/. |
AI-generated illustrations, not observations. Galaxy panels use different angular scales. See the new user guide for details.
| I want to… | Start here |
|---|---|
| Learn the API, customise models or inspect results | Guides |
| Model galaxies in imaging data | Imaging |
| Model interferometer observations | Interferometry |
| Fit observations in multiple wavebands | Multiple datasets |
| Fit several blended galaxies together | Multiple galaxies |
| Measure galaxy structure by fitting ellipses | Ellipse fitting |
| Model the light of galaxies in a cluster | Clusters |
Each folder has a README explaining its examples. You’ll find sample data in dataset/; analysis results are written to output/.
HowToGalaxy teaches galaxy modeling and Bayesian inference through worked notebooks. Start here if you’re new to the subject or would like more explanation alongside the workspace examples.
Ask questions, suggest improvements and share your work in PyAutoLabs Discussions, or chat with us on Slack.
To contribute examples or explore community projects, visit the PyAutoGalaxy community page.
If you use PyAutoGalaxy in your research, see the citation guide.
See the PyAutoGalaxy license.



