Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,14 @@ for the chapter 1 tutorials listed with a `markdown` link below; every other tut
- Tutorial 3: Fitting — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_3_fitting.md))
- Tutorial 4: Methods — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_4_methods.ipynb))
- Tutorial 5: Summary — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_1_introduction/tutorial_5_summary.ipynb) / [markdown](markdown/chapter_1_introduction/tutorial_5_summary.md))
- **[Chapter 2: Modeling](scripts/chapter_2_modeling/README.md)** — Bayesian inference, non-linear searches, galaxy modeling, search chaining, and prior passing.
- Tutorial 1: Non-linear Search — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb))
- Tutorial 2: Practicalities — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb))
- Tutorial 3: Realism and Complexity — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb))
- Tutorial 4: Dealing with Failure — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb))
- Tutorial 5: Linear Profiles — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb))
- Tutorial 6: Masking — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb))
- Tutorial 7: Results — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_7_results.ipynb))
- Tutorial 8: Need for Speed — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_8_need_for_speed.ipynb))
- Tutorial 9: Search Chaining — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_9_search_chaining.ipynb))
- Tutorial 10: Prior Passing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_2_modeling/tutorial_10_prior_passing.ipynb))
- **[Chapter 2: Modeling](scripts/chapter_2_modeling/README.md)** — Practical galaxy models, data and likelihoods, linear profiles and search chaining.
- Tutorial 1: Non-linear Search — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb))
- Tutorial 2: Practicalities — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb))
- Tutorial 3: Why Modeling Is Hard — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_3_why_modeling_is_hard.ipynb))
- Tutorial 4: Linear Profiles — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_4_linear_profiles.ipynb))
- Tutorial 5: Data and Likelihoods — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_5_data_and_likelihoods.ipynb))
- Tutorial 6: Search Chaining — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_6_search_chaining.ipynb))
- Tutorial 7: Summary — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_2_modeling/tutorial_7_summary.ipynb))
- **[Chapter 3: Pixelizations](scripts/chapter_3_pixelizations/README.md)** — Indexed mappings, inversions, regularization and MGE search chaining.
- Tutorial 1: Pixelizations — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb))
- Tutorial 2: Bayesian Regularization — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_3_pixelizations/tutorial_2_bayesian_regularization.ipynb))
Expand All @@ -106,7 +103,9 @@ for the chapter 1 tutorials listed with a `markdown` link below; every other tut
- Tutorial 2: Multi Galaxy — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_4_scaling_up_galaxies/tutorial_2_multi_galaxy.ipynb))
- Tutorial 3: Cluster — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_4_scaling_up_galaxies/tutorial_3_cluster.ipynb))
- **[Optional Tutorials](scripts/chapter_optional/)** — Alternative non-linear searches and advanced topics.
- Tutorial Optional: Searches — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/2026.10.29.1/notebooks/chapter_optional/tutorial_searches.ipynb))
- Alternative Searches — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_optional/tutorial_searches.ipynb))
- Need for Speed — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_optional/tutorial_need_for_speed.ipynb))
- Historical Prior Passing — ([Colab](https://colab.research.google.com/github/PyAutoLabs/HowToGalaxy/blob/main/notebooks/chapter_optional/tutorial_prior_passing.ipynb)); not required reading.

Model-fits can run faster on a GPU. In Colab, enable one via *Runtime* → *Change runtime type*
→ *Hardware accelerator* before running a notebook.
Expand Down
40 changes: 19 additions & 21 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,19 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate.

## chapter_2_modeling

- [Tutorial 10: Prior Passing](scripts/chapter_2_modeling/tutorial_10_prior_passing.py): In the previous tutorial, we used non-linear search chaining to break the model-fitting procedure down into two non-linear searches. This used an initial search to fit a simple model, whose results were used to tune and initialize the priors of a more complex model that was fitted by the second search.
- Contents: Initial Setup, Dataset Auto-Simulation, Model, Search, Result (Search 1), Prior Passing, Result, Wrap Up, Detailed Explanation Of Prior Passing, EXAMPLE
- [Tutorial 1: Non-linear Search](scripts/chapter_2_modeling/tutorial_1_non_linear_search.py): The starting point for most scientific analysis conducted by an Astronomer is that they have observations of a galaxy using a telescope like the Hubble Space Telescope, and seek to learn about the galaxy and the Universe from these observations. With **PyAutoGalaxy**, we seek to learn about the galaxy's structure and morphology, asking questions like how big is the galaxy, is it disky or bulgy, and how is its light distributed?
- Contents: Parameter Space, Non-Linear Search, Search Types, Deeper Background, Data, Model, Priors, Analysis, Searches, Maximum Likelihood Estimation (MLE), Markov Chain Monte Carlo (MCMC), Nested Sampling, Result, Samples, Customizing Searches, Wrap Up
- [Tutorial 2: Practicalities](scripts/chapter_2_modeling/tutorial_2_practicalities.py): In the last tutorial, we introduced foundational statistical concepts essential for model-fitting, such as parameter spaces, likelihoods, priors, and non-linear searches. Understanding these statistical concepts is crucial for performing model fits effectively.
- [Tutorial 3: Realism and Complexity](scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py): In the previous two tutorials, we fitted a fairly basic model: the galaxy's light was a single bulge component. In real observations we know that galaxies are observed to have multiple different morphological structures.
- Contents: Initial Setup, Model + Search + Analysis, Result, Global and Local Maxima, Wrap Up
- [Tutorial 4: Dealing With Failure](scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py): In the previous tutorial we intentionally made our non-linear search infer a local maxima solution and therefore return a physically incorrect model. In this tutorial, we will pretend that we have modeled our galaxy and inferred a local maxima. We introduce three approaches one can take that changes how we fit the model, all of which have the aim of ensuring we infer the global maxima:
- Contents: Initial Setup, Approach 1: Prior Tuning, Approach 2: Reducing Complexity, Approach 3: Look Harder
- [Tutorial 5: Linear Profiles](scripts/chapter_2_modeling/tutorial_5_linear_profiles.py): In the previous tutorial we learned how to balance model complexity with our non-linear search in order to infer accurate model solutions and avoid failure. We saw how in order to fit a model accurately one may have to parameterize and fit a simpler model with fewer non-linear parameters, at the expense of fitting the data less accurately.
- Contents: Initial Setup, Linear Light Profiles, Run Time, Result, Intensities, Visualization, Basis, Model Fit, Disk MGE, Multi Gaussian Expansion Benefits, Positive Only Solver, Other Basis Functions, Wrap Up
- [Tutorial 6: Masking](scripts/chapter_2_modeling/tutorial_6_masking.py): We have learnt everything we need to know about non-linear searches to model a galaxy and infer a good model solution. Now, lets consider masking in more detail, something we have not given much consideration previously. We'll also learn a neat trick to improve the speed and accuracy of a non-linear search.
- Contents: Initial Setup, Mask, Model + Search + Analysis, Discussion, Wrap Up
- [Tutorial 7: Results](scripts/chapter_2_modeling/tutorial_7_results.py): In the previous tutorials, each search returned a `Result` object, which we used to plot the maximum log likelihood fit of each model-fit. In this tutorial, we'll take a look at the result object in a little more detail.
- Contents: Initial Setup, Galaxies & Fit, Samples, Workspace, Database, Wrap Up
- [Tutorial 8: Need For Speed](scripts/chapter_2_modeling/tutorial_8_need_for_speed.py): In this chapter, we have learnt how to model galaxies and how to balance complexity and realism to ensure that we infer a good model.
- Contents: Searching Non-linear Parameter Space, Cost Per Evaluation, JAX, Run Time Estimation, Data Quantity, Wrap Up
- [Tutorial 9: Search Chaining](scripts/chapter_2_modeling/tutorial_9_search_chaining.py): Throughout this chapter, we have fitted the data using just one non-linear search. The previous tutorial discussed the run-time cost of doing this: with a single search, the dimensionality of the model, the priors on its parameters and the search settings must all be juggled at once, leaving us little flexibility to trade them off against one another.
- Contents: Initial Setup, Dataset Auto-Simulation, Model, Search + Analysis, Result, Prior Passing, Result, Wrap Up
- [Tutorial 1: Non-linear Search](scripts/chapter_2_modeling/tutorial_1_non_linear_search.py): In chapter 1, you adjusted a galaxy model by hand and inspected how well its image matched the data. Now we will ask a search to do this for us. Our aim is still to learn about the galaxy: its size, shape and concentration.
- Contents: Parameter Space, Dataset and Mask, Model and Priors, Analysis, Nested Sampling, Result
- [Tutorial 2: Practicalities](scripts/chapter_2_modeling/tutorial_2_practicalities.py): A galaxy can contain a compact bulge and an extended disk. We now fit both, while learning how to run a search, manage its memory use and inspect its output. These practical skills let us assess a model as the fit progresses.
- Contents: Dataset and Mask, Model, Search Settings, Analysis and Run Times, VRAM Use, Output Folder, Unique Identifier, Results and Configuration
- [Tutorial 3: Why Modeling Is Hard](scripts/chapter_2_modeling/tutorial_3_why_modeling_is_hard.py): The bulge and disk in tutorial 2 made our model more realistic, but also harder to fit. Their centres, shapes, brightnesses and sizes can trade off. A search can find a plausible galaxy without finding the best explanation available within the model.
- Contents: A Reference Fit, An Inadequate Search, Local Maxima, Prior Tuning, Reducing Complexity, Look Harder, Benefits and Weaknesses
- [Tutorial 4: Linear Profiles](scripts/chapter_2_modeling/tutorial_4_linear_profiles.py): In tutorial 3, simplifying the bulge and disk geometry made the search easier but restricted the galaxies it could represent. Linear light profiles offer a different opportunity: keep the same profile shapes and solve their intensities directly, removing those dimensions from the non-linear search.
- Contents: Linear Light Profiles, Results and Intensities, Galaxy Structure, Basis, Two Gaussian Groups, Benefits and Limitations
- [Tutorial 5: Data and Likelihoods](scripts/chapter_2_modeling/tutorial_5_data_and_likelihoods.py): So far we have changed the galaxy model and the search. Now consider the other side of the fit: the measurements we include and how they are compared with a prediction. The data, model and Analysis object have distinct jobs. This separation lets the same modelling tools work with different observations and likelihood functions.
- Contents: Masking, Extra Galaxy Noise Scaling, Analysis, Interferometer Data, Multiple Datasets
- [Tutorial 6: Search Chaining](scripts/chapter_2_modeling/tutorial_6_search_chaining.py): A neighbouring galaxy can complicate the fit to our target. We need to describe its light, but repeatedly searching all its parameters while refining the target can waste effort and introduce difficult degeneracies. Search chaining lets us fit different parts of the scene in stages.
- Contents: Dataset, Search 1, Inspect Before Chaining, Search 2, Limits and Pipelines
- [Tutorial 7: Summary](scripts/chapter_2_modeling/tutorial_7_summary.py): (no summary in script docstring)

## chapter_3_pixelizations

Expand All @@ -64,8 +58,12 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate.

## chapter_optional

- [Tutorial: Alternative Searches](scripts/chapter_optional/tutorial_searches.py): Up to now, we've always used the non-linear search Nautilus and not considered the input parameters that control its sampling. In this tutorial, we'll consider how we can change these setting to balance finding the global maxima solution with fast run time.
- Contents: Nested Sampling, Optimizers, MCMC
- [Optional Tutorial: Need for Speed](scripts/chapter_optional/tutorial_need_for_speed.py): Return to this tutorial when a fit is too slow for your scientific needs. Faster likelihood calculations help, but a well-organised model and search often matter just as much. Hardware cannot make an inappropriate model fit.
- Contents: Search Effort, Likelihood Cost, JAX and Batching, Measuring Runtime, Data Quantity
- [Optional Historical Tutorial: Prior Passing](scripts/chapter_optional/tutorial_prior_passing.py): This is historical background, not part of the recommended HowToGalaxy learning path. Older versions of the PyAutoGalaxy / PyAutoLens workflow automatically narrowed priors between searches. That default behaviour has been disabled. New readers are discouraged from investing time in the old prior-passing recipes: learn the component-separation approach in chapter 2 tutorial 6 instead.
- Contents: Historical Behaviour, Current Behaviour, Why It Is Optional
- [Optional Tutorial: Alternative Searches](scripts/chapter_optional/tutorial_searches.py): You can complete HowToGalaxy using Nautilus without studying search algorithms in detail. Return here if you want to understand the fast Prodigy stage of search chaining, or compare alternative approaches for your own work.
- Contents: Optimisation, Nested Sampling, MCMC

## simulators

Expand Down
Loading
Loading