diff --git a/CITATIONS.md b/CITATIONS.md new file mode 100644 index 0000000..cb6645e --- /dev/null +++ b/CITATIONS.md @@ -0,0 +1,16 @@ +# Citations & References + +The bibtex entries for **PyAutoGalaxy** and its affiliated software packages can be found +[here](https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.bib), with example text for citing **PyAutoGalaxy** +in [.tex format here](https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.tex) format here and +[.md format here](https://github.com/Jammy2211/PyAutoGalaxy/blob/main/files/citations.md). + +As shown in the examples, we would greatly appreciate it if you mention **PyAutoGalaxy** by name and include a link to +our GitHub page! + +**PyAutoGalaxy** is published in the [Journal of Open Source Software](https://joss.theoj.org/papers/10.21105/joss.02825#) and its +entry in the above .bib file is under the citation key `pyautogalaxy`. + +You should also specify the non-linear search(es) you use in your analysis (e.g. Dynesty, Emcee, PySwarms, etc) in +the main body of text, and delete as appropriate any packages your analysis did not use. The citations.bib file includes +the citation key for all of these projects. diff --git a/CITATIONS.rst b/CITATIONS.rst deleted file mode 100644 index 26b2b06..0000000 --- a/CITATIONS.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _references: - -Citations & References -====================== - -The bibtex entries for **PyAutoGalaxy** and its affiliated software packages can be found -`here `_, with example text for citing **PyAutoGalaxy** -in `.tex format here `_ format here and -`.md format here `_. - -As shown in the examples, we would greatly appreciate it if you mention **PyAutoGalaxy** by name and include a link to -our GitHub page! - -**PyAutoGalaxy** is published in the `Journal of Open Source Software `_ and its -entry in the above .bib file is under the citation key ``pyautogalaxy``. - -You should also specify the non-linear search(es) you use in your analysis (e.g. Dynesty, Emcee, PySwarms, etc) in -the main body of text, and delete as appropriate any packages your analysis did not use. The citations.bib file includes -the citation key for all of these projects. - diff --git a/README.md b/README.md new file mode 100644 index 0000000..d049d49 --- /dev/null +++ b/README.md @@ -0,0 +1,98 @@ +# HowToGalaxy + +[Installation Guide](https://pyautogalaxy.readthedocs.io/en/latest/installation/overview.html) | +[PyAutoGalaxy readthedocs](https://pyautogalaxy.readthedocs.io/en/latest/index.html) | +[autogalaxy_workspace](https://github.com/PyAutoLabs/autogalaxy_workspace) + + + +Welcome to **HowToGalaxy** — the tutorial lecture series for [PyAutoGalaxy](https://github.com/PyAutoLabs/PyAutoGalaxy), +an open-source library for modeling the light of galaxies. + +**HowToGalaxy** teaches new users how to model galaxy morphologies from scratch. It assumes minimal prior +knowledge of astronomy or statistics and takes you from first principles all the way to using +**PyAutoGalaxy** for professional scientific research. + +For experienced scientists who already know the fundamentals of galaxy light profile fitting and Bayesian +modeling, the [autogalaxy_workspace](https://github.com/PyAutoLabs/autogalaxy_workspace) examples will be +more appropriate — they are concise and assume the concepts taught in **HowToGalaxy** as background. + +## Chapters + +- `chapter_1_introduction` — An introduction to galaxy morphology and **PyAutoGalaxy**: grids, light + profiles, galaxies, simulated imaging data, and fitting. +- `chapter_2_modeling` — Bayesian inference, non-linear searches, and how to fit a galaxy model to CCD + imaging data with **PyAutoGalaxy**. +- `chapter_3_search_chaining` — Chaining multiple non-linear searches together to build automated galaxy + modeling pipelines for complex systems. +- `chapter_4_pixelizations` — Pixelized source reconstructions (inversions) for galaxies with irregular + morphologies. +- `chapter_optional` — Optional tutorials on alternative non-linear searches and other advanced topics. + +**HowToGalaxy** currently sits at four chapters. Each chapter will take around a day to work through. +We recommend completing chapters 1 and 2, then applying what you've learned to real galaxy modeling in the +`autogalaxy_workspace` before returning for the more advanced material in chapters 3 and 4. + +## Getting Started + +You can run the tutorials on your own machine by following the +[PyAutoGalaxy installation guide](https://pyautogalaxy.readthedocs.io/en/latest/installation/overview.html), +then cloning this repository: + +```bash +git clone https://github.com/PyAutoLabs/HowToGalaxy.git +cd HowToGalaxy +``` + +Alternatively, every tutorial can be opened directly in Google Colab via the links in each chapter's +`README.md`. + +The tutorials are distributed as both Jupyter notebooks (`notebooks/`) and Python scripts (`scripts/`). +We recommend the notebooks for reading — images and plots render inline, and you can step through small +code blocks interactively. Use the Python scripts for actual **PyAutoGalaxy** use, which is the workflow +chapter 3 onwards transitions you to. + +## Before Chapter 1 + +Before starting chapter 1, complete `scripts/chapter_1_introduction/tutorial_0_visualization.py` +(or the equivalent notebook). This confirms your **PyAutoGalaxy** installation, walks you through how +images and figures display in Jupyter, and configures matplotlib for the rest of the tutorial series. + +## Repository Structure + +- `scripts/` — Runnable Python tutorial scripts, one subfolder per chapter. +- `notebooks/` — Jupyter notebook versions of the scripts (auto-generated; see below). +- `config/` — **PyAutoGalaxy** configuration YAML files used by the tutorials. +- `dataset/` — Tutorial datasets are generated at runtime by scripts in `scripts/simulators/` — + no `.fits` files are committed. +- `output/` — Model-fit results (generated at runtime, not committed). + +## Notebooks vs Scripts + +Notebooks in `notebooks/` are generated from the Python files in `scripts/`. **Always edit the \`\`.py\`\` +scripts, never the notebooks directly.** The `# %%` markers in each script alternate between code and +markdown cells, which [PyAutoBuild](https://github.com/PyAutoLabs/PyAutoBuild) uses to produce the +`.ipynb` files. + +## Relationship to autogalaxy_workspace + +[autogalaxy_workspace](https://github.com/PyAutoLabs/autogalaxy_workspace) is the main user-facing +workspace for **PyAutoGalaxy** — concise examples, guides, and science templates aimed at users who have +a working understanding of galaxy morphology and light profile fitting. **HowToGalaxy** is the teaching +companion. Many tutorials in chapters 2–4 reference `autogalaxy_workspace` scripts as the next place to +go after the relevant concept has been introduced. + +## Citations + +If you use **HowToGalaxy** or **PyAutoGalaxy** in your research, please cite the references listed in +`CITATIONS.rst`. + +## Community & Support + +Support for **PyAutoGalaxy** is available via our Slack workspace. Slack is invitation-only; send an email +if you'd like an invite. + +For installation issues, bug reports, or feature requests, raise an issue on the +[PyAutoGalaxy GitHub issues page](https://github.com/PyAutoLabs/PyAutoGalaxy/issues) (for library issues) +or the [HowToGalaxy GitHub issues page](https://github.com/PyAutoLabs/HowToGalaxy/issues) (for tutorial +content issues). diff --git a/README.rst b/README.rst deleted file mode 100644 index 1bdb58d..0000000 --- a/README.rst +++ /dev/null @@ -1,108 +0,0 @@ -HowToGalaxy -=========== - -`Installation Guide `_ | -`PyAutoGalaxy readthedocs `_ | -`autogalaxy_workspace `_ - -.. image:: https://github.com/Jammy2211/PyAutoLogo/blob/main/gifs/pyautogalaxy.gif?raw=true - :width: 900 - -Welcome to **HowToGalaxy** — the tutorial lecture series for `PyAutoGalaxy `_, -an open-source library for modeling the light of galaxies. - -**HowToGalaxy** teaches new users how to model galaxy morphologies from scratch. It assumes minimal prior -knowledge of astronomy or statistics and takes you from first principles all the way to using -**PyAutoGalaxy** for professional scientific research. - -For experienced scientists who already know the fundamentals of galaxy light profile fitting and Bayesian -modeling, the `autogalaxy_workspace `_ examples will be -more appropriate — they are concise and assume the concepts taught in **HowToGalaxy** as background. - -Chapters --------- - -- ``chapter_1_introduction`` — An introduction to galaxy morphology and **PyAutoGalaxy**: grids, light - profiles, galaxies, simulated imaging data, and fitting. -- ``chapter_2_modeling`` — Bayesian inference, non-linear searches, and how to fit a galaxy model to CCD - imaging data with **PyAutoGalaxy**. -- ``chapter_3_search_chaining`` — Chaining multiple non-linear searches together to build automated galaxy - modeling pipelines for complex systems. -- ``chapter_4_pixelizations`` — Pixelized source reconstructions (inversions) for galaxies with irregular - morphologies. -- ``chapter_optional`` — Optional tutorials on alternative non-linear searches and other advanced topics. - -**HowToGalaxy** currently sits at four chapters. Each chapter will take around a day to work through. -We recommend completing chapters 1 and 2, then applying what you've learned to real galaxy modeling in the -``autogalaxy_workspace`` before returning for the more advanced material in chapters 3 and 4. - -Getting Started ---------------- - -You can run the tutorials on your own machine by following the -`PyAutoGalaxy installation guide `_, -then cloning this repository: - -.. code-block:: bash - - git clone https://github.com/PyAutoLabs/HowToGalaxy.git - cd HowToGalaxy - -Alternatively, every tutorial can be opened directly in Google Colab via the links in each chapter's -``README.rst``. - -The tutorials are distributed as both Jupyter notebooks (``notebooks/``) and Python scripts (``scripts/``). -We recommend the notebooks for reading — images and plots render inline, and you can step through small -code blocks interactively. Use the Python scripts for actual **PyAutoGalaxy** use, which is the workflow -chapter 3 onwards transitions you to. - -Before Chapter 1 ----------------- - -Before starting chapter 1, complete ``scripts/chapter_1_introduction/tutorial_0_visualization.py`` -(or the equivalent notebook). This confirms your **PyAutoGalaxy** installation, walks you through how -images and figures display in Jupyter, and configures matplotlib for the rest of the tutorial series. - -Repository Structure --------------------- - -- ``scripts/`` — Runnable Python tutorial scripts, one subfolder per chapter. -- ``notebooks/`` — Jupyter notebook versions of the scripts (auto-generated; see below). -- ``config/`` — **PyAutoGalaxy** configuration YAML files used by the tutorials. -- ``dataset/`` — Tutorial datasets are generated at runtime by scripts in ``scripts/simulators/`` — - no ``.fits`` files are committed. -- ``output/`` — Model-fit results (generated at runtime, not committed). - -Notebooks vs Scripts --------------------- - -Notebooks in ``notebooks/`` are generated from the Python files in ``scripts/``. **Always edit the ``.py`` -scripts, never the notebooks directly.** The ``# %%`` markers in each script alternate between code and -markdown cells, which `PyAutoBuild `_ uses to produce the -``.ipynb`` files. - -Relationship to autogalaxy_workspace ------------------------------------- - -`autogalaxy_workspace `_ is the main user-facing -workspace for **PyAutoGalaxy** — concise examples, guides, and science templates aimed at users who have -a working understanding of galaxy morphology and light profile fitting. **HowToGalaxy** is the teaching -companion. Many tutorials in chapters 2–4 reference ``autogalaxy_workspace`` scripts as the next place to -go after the relevant concept has been introduced. - -Citations ---------- - -If you use **HowToGalaxy** or **PyAutoGalaxy** in your research, please cite the references listed in -``CITATIONS.rst``. - -Community & Support -------------------- - -Support for **PyAutoGalaxy** is available via our Slack workspace. Slack is invitation-only; send an email -if you'd like an invite. - -For installation issues, bug reports, or feature requests, raise an issue on the -`PyAutoGalaxy GitHub issues page `_ (for library issues) -or the `HowToGalaxy GitHub issues page `_ (for tutorial -content issues). diff --git a/config/README.md b/config/README.md new file mode 100644 index 0000000..c9bfff6 --- /dev/null +++ b/config/README.md @@ -0,0 +1,14 @@ +The `config` folder contains configuration files which customize default **PyAutoGalaxy**. + +# Folders + +- `grids`: Configs for default behaviour of grids when used for ray-tracing. +- `non-linear`: Configs for default non-linear search (e.g. MCMC, nested sampling) settings. +- `notation`: Configs defining labels and formatting of model parameters when used for visualization. +- `priors`: Configs defining default priors assumed on every model component and set of parameters. +- `visualize`: Configs defining what images are output by a model fit. + +# Files + +- `generag.yaml`: Customizes general **PyAutoGalaxy** settings. +- `logging.yaml`: Customizes the logging behaviour of **PyAutoGalaxy**. diff --git a/config/README.rst b/config/README.rst deleted file mode 100755 index 3a3f0ec..0000000 --- a/config/README.rst +++ /dev/null @@ -1,16 +0,0 @@ -The ``config`` folder contains configuration files which customize default **PyAutoGalaxy**. - -Folders -------- - -- ``grids``: Configs for default behaviour of grids when used for ray-tracing. -- ``non-linear``: Configs for default non-linear search (e.g. MCMC, nested sampling) settings. -- ``notation``: Configs defining labels and formatting of model parameters when used for visualization. -- ``priors``: Configs defining default priors assumed on every model component and set of parameters. -- ``visualize``: Configs defining what images are output by a model fit. - -Files ------ - -- ``generag.yaml``: Customizes general **PyAutoGalaxy** settings. -- ``logging.yaml``: Customizes the logging behaviour of **PyAutoGalaxy**. \ No newline at end of file diff --git a/config/non_linear/README.md b/config/non_linear/README.md new file mode 100644 index 0000000..322e103 --- /dev/null +++ b/config/non_linear/README.md @@ -0,0 +1,8 @@ +The `non_linear` folder contains configuration files which customize the default behaviour of non-linear searches in +**PyAutoGalaxy**. + +# Files + +- `mcmc.yaml`: Settings default behaviour of MCMC non-linear searches (e.g. Emcee). +- `nest.yaml`: Settings default behaviour of nested sampler non-linear searches (e.g. Dynesty). +- `mle.yaml`: Settings default behaviour of maximum likelihood estimator (mle) searches (e.g. LBFGS). diff --git a/config/non_linear/README.rst b/config/non_linear/README.rst deleted file mode 100644 index 7be9565..0000000 --- a/config/non_linear/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -The ``non_linear`` folder contains configuration files which customize the default behaviour of non-linear searches in -**PyAutoGalaxy**. - -Files ------ - -- ``mcmc.yaml``: Settings default behaviour of MCMC non-linear searches (e.g. Emcee). -- ``nest.yaml``: Settings default behaviour of nested sampler non-linear searches (e.g. Dynesty). -- ``mle.yaml``: Settings default behaviour of maximum likelihood estimator (mle) searches (e.g. LBFGS). \ No newline at end of file diff --git a/config/priors/README.md b/config/priors/README.md new file mode 100644 index 0000000..73e432f --- /dev/null +++ b/config/priors/README.md @@ -0,0 +1,42 @@ +The prior config files contain the default priors and related variables for every light profile and mass profile +when it is used as a model. + +They appear as follows: + +```bash +Sersic: + effective_radius: + type: Uniform + lower_limit: 0.0 + upper_limit: 100.0 + width_modifier: + type: Absolute + value: 20.0 + limits: + lower: -inf + upper: inf +``` + +The sections of this example config set the following: + +> type {Uniform, Gaussian, LogUniform} +> +> : The default prior given to this parameter when used by the non-linear search. In the example above, a +> UniformPrior is used with lower_limit of 0.0 and upper_limit of 4.0. A GaussianPrior could be used by +> putting "Gaussian" in the "type" box, with "mean" and "sigma" used to set the default values. Any prior can be +> set in an analogous fashion (see the example configs). +> +> width_modifier +> +> : When the results of a search are passed to a subsequent search to set up the priors of its non-linear search, +> this entry describes how the Prior is passed. For a full description of prior passing, checkout the examples +> in 'autogalaxy_workspace/examples/complex/linking'. +> +> limits +> +> : When the results of a search are passed to a subsequent search, they are passed using a GaussianPrior. The +> limits set the physical lower and upper limits of this GaussianPrior, such that parameter samples +> can not go beyond these limits. + +The files `template_module.yaml` and `TemplateObject.yaml` give templates one can use to set up prior default +configs for your own model components. diff --git a/config/priors/README.rst b/config/priors/README.rst deleted file mode 100755 index f382868..0000000 --- a/config/priors/README.rst +++ /dev/null @@ -1,37 +0,0 @@ -The prior config files contain the default priors and related variables for every light profile and mass profile -when it is used as a model. - -They appear as follows: - -.. code-block:: bash - - Sersic: - effective_radius: - type: Uniform - lower_limit: 0.0 - upper_limit: 100.0 - width_modifier: - type: Absolute - value: 20.0 - limits: - lower: -inf - upper: inf - -The sections of this example config set the following: - - type {Uniform, Gaussian, LogUniform} - The default prior given to this parameter when used by the non-linear search. In the example above, a - UniformPrior is used with lower_limit of 0.0 and upper_limit of 4.0. A GaussianPrior could be used by - putting "Gaussian" in the "type" box, with "mean" and "sigma" used to set the default values. Any prior can be - set in an analogous fashion (see the example configs). - width_modifier - When the results of a search are passed to a subsequent search to set up the priors of its non-linear search, - this entry describes how the Prior is passed. For a full description of prior passing, checkout the examples - in 'autogalaxy_workspace/examples/complex/linking'. - limits - When the results of a search are passed to a subsequent search, they are passed using a GaussianPrior. The - limits set the physical lower and upper limits of this GaussianPrior, such that parameter samples - can not go beyond these limits. - -The files ``template_module.yaml`` and ``TemplateObject.yaml`` give templates one can use to set up prior default -configs for your own model components. \ No newline at end of file diff --git a/config/priors/ellipse/README.rst b/config/priors/ellipse/README.md old mode 100755 new mode 100644 similarity index 59% rename from config/priors/ellipse/README.rst rename to config/priors/ellipse/README.md index 1fbbe58..00e7f1f --- a/config/priors/ellipse/README.rst +++ b/config/priors/ellipse/README.md @@ -1,6 +1,6 @@ -The ``ellipse`` folder contains configuration files for the default priors assumed for ``ellipse`` objects. - -These model components are used for ellipse isophote fitting, which models the surface brightness of a galaxy as a -series of ellipses, which can include multipole perturbations. - -The main object used for modeling is the `Ellipse` object, with a list of `Ellipse` objects used to model the galaxy. \ No newline at end of file +The `ellipse` folder contains configuration files for the default priors assumed for `ellipse` objects. + +These model components are used for ellipse isophote fitting, which models the surface brightness of a galaxy as a +series of ellipses, which can include multipole perturbations. + +The main object used for modeling is the `Ellipse` object, with a list of `Ellipse` objects used to model the galaxy. diff --git a/config/priors/galaxy/README.md b/config/priors/galaxy/README.md new file mode 100644 index 0000000..21c3b0d --- /dev/null +++ b/config/priors/galaxy/README.md @@ -0,0 +1,6 @@ +The `galaxy` folder contains configuration files for the default priors assumed for `Galaxy` object properties **PyAutoGalaxy**. + +# Folders + +- `redshift`: Configs for priors on the redshift of a galaxy, when treated as a free parameter. +- `hyper`: Configs for hyper-galaxy model components which scale the noise-map. diff --git a/config/priors/galaxy/README.rst b/config/priors/galaxy/README.rst deleted file mode 100755 index ed3945c..0000000 --- a/config/priors/galaxy/README.rst +++ /dev/null @@ -1,7 +0,0 @@ -The ``galaxy`` folder contains configuration files for the default priors assumed for ``Galaxy`` object properties **PyAutoGalaxy**. - -Folders -------- - -- ``redshift``: Configs for priors on the redshift of a galaxy, when treated as a free parameter. -- ``hyper``: Configs for hyper-galaxy model components which scale the noise-map. \ No newline at end of file diff --git a/config/priors/light/README.md b/config/priors/light/README.md new file mode 100644 index 0000000..255f6da --- /dev/null +++ b/config/priors/light/README.md @@ -0,0 +1,9 @@ +The `light` folder contains configuration files for the default priors assumed for light profiles in **PyAutoGalaxy** (e.g. `Sersic`, `Gaussian`). + +# Folders + +- `standard`: Configs for standard light profiles (specified via `ag.lp.`), which include an `intensity` parameter to control their overall amount of emission. +- `linear`: Configs for linear light profiles (specified via `ag.lp_linear.`),, where the `intensity` parameter is implicitly solved for via linear algebra. +- `shapelets`: Configs for shapelets (specified via `ag.lp_linear.`), which decomposed the light of a galaxy via shapelet basis functions. +- `operated`: Configs for operated light profiles (specified via `ag.lp_operated.`), where the light profile represents the already PSF convolved emission. +- `linear_operated`: Configs for linear operated light profiles (specified via `ag.lp_linear_operated.`), which behave like operated light profiles but with a linearly solved for `intensity`. diff --git a/config/priors/light/README.rst b/config/priors/light/README.rst deleted file mode 100755 index 42258bb..0000000 --- a/config/priors/light/README.rst +++ /dev/null @@ -1,10 +0,0 @@ -The ``light`` folder contains configuration files for the default priors assumed for light profiles in **PyAutoGalaxy** (e.g. ``Sersic``, ``Gaussian``). - -Folders -------- - -- ``standard``: Configs for standard light profiles (specified via ``ag.lp.``), which include an ``intensity`` parameter to control their overall amount of emission. -- ``linear``: Configs for linear light profiles (specified via ``ag.lp_linear.``),, where the ``intensity`` parameter is implicitly solved for via linear algebra. -- ``shapelets``: Configs for shapelets (specified via ``ag.lp_linear.``), which decomposed the light of a galaxy via shapelet basis functions. -- ``operated``: Configs for operated light profiles (specified via ``ag.lp_operated.``), where the light profile represents the already PSF convolved emission. -- ``linear_operated``: Configs for linear operated light profiles (specified via ``ag.lp_linear_operated.``), which behave like operated light profiles but with a linearly solved for ``intensity``. \ No newline at end of file diff --git a/config/priors/mass/README.md b/config/priors/mass/README.md new file mode 100644 index 0000000..56278f8 --- /dev/null +++ b/config/priors/mass/README.md @@ -0,0 +1,8 @@ +The `mass` folder contains configuration files for the default priors assumed for mass profiles in **PyAutoGalaxy**. + +# Folders + +- `dark`: Configs for mass profiles that typically represent dark matter (e.g. `NFW`, `gNFW`). +- `stellar`: Configs for mass profiles that typically represent stellar matter (e.g. ``` Sersic`, ``Gaussian ```). +- `total`: Configs for mass profiles that typically represent the total (e.g. stellar and dark matter) mass distribution (e.g. ``` Isothermal`, ``PowerLaw ```). +- `sheets`: Configs for mass profiles that represent sheet-like mass components (e.g. ``` ExternalShear`, ``MassSheet ```). diff --git a/config/priors/mass/README.rst b/config/priors/mass/README.rst deleted file mode 100755 index 6c8b9fd..0000000 --- a/config/priors/mass/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -The ``mass`` folder contains configuration files for the default priors assumed for mass profiles in **PyAutoGalaxy**. - -Folders -------- - -- ``dark``: Configs for mass profiles that typically represent dark matter (e.g. ``NFW``, ``gNFW``). -- ``stellar``: Configs for mass profiles that typically represent stellar matter (e.g. ``Sersic`, ``Gaussian``). -- ``total``: Configs for mass profiles that typically represent the total (e.g. stellar and dark matter) mass distribution (e.g. ``Isothermal`, ``PowerLaw``). -- ``sheets``: Configs for mass profiles that represent sheet-like mass components (e.g. ``ExternalShear`, ``MassSheet``). \ No newline at end of file diff --git a/config/priors/mesh/README.md b/config/priors/mesh/README.md new file mode 100644 index 0000000..ac0d7fc --- /dev/null +++ b/config/priors/mesh/README.md @@ -0,0 +1,3 @@ +The `mesh` folder contains configuration files for the default priors assumed for `mesh` objects. + +These model components reconstruct a galaxy's emission using a rectangular grid, Delaunay triangulation or Voronoi mesh. diff --git a/config/priors/mesh/README.rst b/config/priors/mesh/README.rst deleted file mode 100755 index 820f436..0000000 --- a/config/priors/mesh/README.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``mesh`` folder contains configuration files for the default priors assumed for ``mesh`` objects. - -These model components reconstruct a galaxy's emission using a rectangular grid, Delaunay triangulation or Voronoi mesh. \ No newline at end of file diff --git a/config/priors/regularization/README.md b/config/priors/regularization/README.md new file mode 100644 index 0000000..bec44e5 --- /dev/null +++ b/config/priors/regularization/README.md @@ -0,0 +1,3 @@ +The `regularization` folder contains configuration files for the default priors assumed for `regularization` objects. + +These model components regularize the smoothness of a galaxy's emission when it is reconstructed using a `mesh` object. diff --git a/config/priors/regularization/README.rst b/config/priors/regularization/README.rst deleted file mode 100755 index f15562e..0000000 --- a/config/priors/regularization/README.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``regularization`` folder contains configuration files for the default priors assumed for ``regularization`` objects. - -These model components regularize the smoothness of a galaxy's emission when it is reconstructed using a ``mesh`` object. \ No newline at end of file diff --git a/config/visualize/README.md b/config/visualize/README.md new file mode 100644 index 0000000..bcbf333 --- /dev/null +++ b/config/visualize/README.md @@ -0,0 +1,11 @@ +The `config` folder contains configuration files which customize default **PyAutoGalaxy**. + +# Files + +- `generag.yaml`: Customizes general visualization settings (e.g. the matplotlib backend). +- `include.yaml`: Customize features that appears on plotted images by default (e.g. a mask, a grid). +- `plots.yaml`: Customize which figures are output during a model-fit. +- `plots_search.yaml`: Customize which non-linear search figures are output during a model-fit. +- `mat_wrap.yaml`: Specify the default matplotlib settings when figures and subplots are plotted. +- `mat_wrap_1d.yaml`: Specify the default matplotlib settings when 1D figures and subplots are plotted. +- `mat_wrap_2d.yaml`: Specify the default matplotlib settings when 2D figures and subplots are plotted. diff --git a/config/visualize/README.rst b/config/visualize/README.rst deleted file mode 100755 index 8a3402a..0000000 --- a/config/visualize/README.rst +++ /dev/null @@ -1,12 +0,0 @@ -The ``config`` folder contains configuration files which customize default **PyAutoGalaxy**. - -Files ------ - -- ``generag.yaml``: Customizes general visualization settings (e.g. the matplotlib backend). -- ``include.yaml``: Customize features that appears on plotted images by default (e.g. a mask, a grid). -- ``plots.yaml``: Customize which figures are output during a model-fit. -- ``plots_search.yaml``: Customize which non-linear search figures are output during a model-fit. -- ``mat_wrap.yaml``: Specify the default matplotlib settings when figures and subplots are plotted. -- ``mat_wrap_1d.yaml``: Specify the default matplotlib settings when 1D figures and subplots are plotted. -- ``mat_wrap_2d.yaml``: Specify the default matplotlib settings when 2D figures and subplots are plotted. \ No newline at end of file diff --git a/notebooks/README.rst b/notebooks/README.md old mode 100755 new mode 100644 similarity index 58% rename from notebooks/README.rst rename to notebooks/README.md index dad49ba..dc57797 --- a/notebooks/README.rst +++ b/notebooks/README.md @@ -1,125 +1,115 @@ -The ``HowToGalaxy`` folder contains **HowToGalaxy** lectures, which teach a new user how to model a galaxy. - -Folders -------- - -- ``chapter_1_introduction``: An introduction to galaxy morphology and structure using **PyAutoGalaxy**. -- ``chapter_2_modeling``: How to model galaxies, including a primer on Bayesian non-linear analysis. -- ``chapter_3_search_chaining``: How to fit complex models using non-linear search chaining. -- ``chapter_4_pixelizations``: How to perform pixelized reconstructions of a galaxy. -- ``chapter_optional``: Optional tutorials. - -Full Explanation ----------------- - -Welcome to **HowToGalaxy** - The **PyAutoGalaxy** tutorial! - -HOW TO TACKLE HowToGalaxy ------------------------ - -The **HowToGalaxy** lecture series current sits at 4 chapters, and each will take a day or so to go through -properly. You probably want to be modeling galaxies faster than that! Furthermore, the concepts -in the later chapters are pretty challenging, and familiarity and modeling is desirable before -you tackle them. - -Therefore, we recommend that you complete chapters 1 & 2 and then apply what you've learnt to the modeling of simulated -and real galaxy data, using the scripts found in the 'autogalaxy_workspace'. Once you're happy -with the results and confident with your use of **PyAutoGalaxy**, you can then begin to cover the advanced functionality -covered in chapters 3 & 4. - -JUYPTER NOTEBOOKS ------------------ - -All tutorials are supplied as Jupyter Notebooks, which come with a '.ipynb' suffix. For those new to Python, Jupyter -Notebooks are a different way to write, view and use Python code. Compared to the traditional Python scripts, -they allow: - -- Small blocks of code to be viewed and run at a time. -- Images and visualization from a code to be displayed directly underneath it. -- Text script to appear between the blocks of code. - -This makes them an ideal way for us to present the **HowToGalaxy** lecture series, therefore I recommend you get yourself -a Jupyter notebook viewer (https://jupyter.org/) if you have not done so already. - -If you *really* want to use Python scripts, all tutorials are supplied a ```` python files in the 'scripts' folder of -each chapter. - -For actual **PyAutoGalaxy** use, I recommend you use Python scripts. Therefore, as you go through the lecture series -you will notice that we will transition you to Python scripts in the third chapter. - -VISUALIZATION -------------- - -Before beginning the **HowToGalaxy** lecture series, in chapter 1 you should do 'tutorial_0_visualization'. This will -take you through how **PyAutoGalaxy** interfaces with matplotlib to perform visualization and will get you setup such that -images and figures display correctly in your Jupyter notebooks. - -CODE STYLE AND FORMATTING -------------------------- - -When you begin the notebooks, you may notice the style and formatting of our Python code looks different to what you -are used to. For example, it is common for brackets to be placed on their own line at the end of function calls, -the inputs of a function or class may be listed over many separate lines and the code in general takes up a lot more -space then you are used to. - -This is intentional, because we believe it makes the cleanest, most readable code possible. In fact - lots of people do, -which is why we use an auto-formatter to produce the code in a standardized format. If you're interested in the style -and would like to adapt it to your own code, check out the Python auto-code formatter 'black'. - -https://github.com/python/black - -OVERVIEW OF CHAPTER 1 (Beginner) --------------------------------- - -**Galaxy Structure with PyAutoGalaxy** - -In chapter 1, we'll learn about galaxy structure and **PyAutoGalaxy**. At the end, you'll be able to: - -1) Create uniform grid's of (x,y) Cartesian coordinates. -2) Combine these grid's with light profiles to make images. -3) Combine these light profiles to make galaxies. -4) Simulate telescope CCD imaging data of a galaxy. -5) Fit imaging data with model images generated via galaxy objects. - -OVERVIEW OF CHAPTER 2 (Beginner) --------------------------------- - -**Bayesian Inference and Non-linear Searches** - -In chapter 2, we'll cover Bayesian inference and model-fitting via a non-linear search. We will use these tools to -fit CCD imaging data of a galaxy with a model. At the end, you'll understand: - -1) The concept of a non-linear search and non-linear parameter space. -2) How to fit a model to galaxy CCD imaging via a non-linear search. -3) The trade-off between realism and complexity when choosing a model. -4) Why an incorrect model may be inferred and how to prevent this from happening. -5) The challenges that are involved in inferred a robust model in a computationally reasonable run-time. - -**Once completed, you'll be ready to model your own galaxies with PyAutoGalaxy!** - -OVERVIEW OF CHAPTER 3 (Intermediate) ------------------------------------- - -**Automated Modeling with non-linear search chaining** - -In chapter 3, we'll learn how to chain multiple non-linear searches together to build automated modeling pipelines -which can: - -1) Break-down the fitting of a model using multiple non-linear searches and prior passing. -2) Use a custom pipeline to fit data containing multiple galaxy where each galaxy is fitted one at a time. -3) Fit the global structure of a galaxy, followed by faint morphological features like a bar. - -OVERVIEW OF CHAPTER 4 (Intermediate) ------------------------------------- - -**Using an inverison to perform a pixelized morphology reconstructions** - -In chapter 4, we'll learn how to reconstruct morphology features of a galaxy using a pixel-grid, ensuring that we can -fit an accurate model to sources with complex and irregular morphologies. You'll learn how to: - -1) Pixelize a galaxy reconstruction into pixels. -2) Perform a linear inversion using this pixelization to reconstruct the galaxy's light. -3) Apply a smoothness prior on the galaxy reconstruction, called regularization. -4) Apply smoothing within a Bayesian framework to objectively quantify the reconstruction's complexity. -5) Use alternative pixelizations, for example a Voronoi mesh. -6) Use these features to fit a model via non-linear searches. \ No newline at end of file +The `HowToGalaxy` folder contains **HowToGalaxy** lectures, which teach a new user how to model a galaxy. + +# Folders + +- `chapter_1_introduction`: An introduction to galaxy morphology and structure using **PyAutoGalaxy**. +- `chapter_2_modeling`: How to model galaxies, including a primer on Bayesian non-linear analysis. +- `chapter_3_search_chaining`: How to fit complex models using non-linear search chaining. +- `chapter_4_pixelizations`: How to perform pixelized reconstructions of a galaxy. +- `chapter_optional`: Optional tutorials. + +# Full Explanation + +Welcome to **HowToGalaxy** - The **PyAutoGalaxy** tutorial! + +# HOW TO TACKLE HowToGalaxy + +The **HowToGalaxy** lecture series current sits at 4 chapters, and each will take a day or so to go through +properly. You probably want to be modeling galaxies faster than that! Furthermore, the concepts +in the later chapters are pretty challenging, and familiarity and modeling is desirable before +you tackle them. + +Therefore, we recommend that you complete chapters 1 & 2 and then apply what you've learnt to the modeling of simulated +and real galaxy data, using the scripts found in the 'autogalaxy_workspace'. Once you're happy +with the results and confident with your use of **PyAutoGalaxy**, you can then begin to cover the advanced functionality +covered in chapters 3 & 4. + +# JUYPTER NOTEBOOKS + +All tutorials are supplied as Jupyter Notebooks, which come with a '.ipynb' suffix. For those new to Python, Jupyter +Notebooks are a different way to write, view and use Python code. Compared to the traditional Python scripts, +they allow: + +- Small blocks of code to be viewed and run at a time. +- Images and visualization from a code to be displayed directly underneath it. +- Text script to appear between the blocks of code. + +This makes them an ideal way for us to present the **HowToGalaxy** lecture series, therefore I recommend you get yourself +a Jupyter notebook viewer () if you have not done so already. + +If you *really* want to use Python scripts, all tutorials are supplied a \`\` python files in the 'scripts' folder of +each chapter. + +For actual **PyAutoGalaxy** use, I recommend you use Python scripts. Therefore, as you go through the lecture series +you will notice that we will transition you to Python scripts in the third chapter. + +# VISUALIZATION + +Before beginning the **HowToGalaxy** lecture series, in chapter 1 you should do 'tutorial_0_visualization'. This will +take you through how **PyAutoGalaxy** interfaces with matplotlib to perform visualization and will get you setup such that +images and figures display correctly in your Jupyter notebooks. + +# CODE STYLE AND FORMATTING + +When you begin the notebooks, you may notice the style and formatting of our Python code looks different to what you +are used to. For example, it is common for brackets to be placed on their own line at the end of function calls, +the inputs of a function or class may be listed over many separate lines and the code in general takes up a lot more +space then you are used to. + +This is intentional, because we believe it makes the cleanest, most readable code possible. In fact - lots of people do, +which is why we use an auto-formatter to produce the code in a standardized format. If you're interested in the style +and would like to adapt it to your own code, check out the Python auto-code formatter 'black'. + + + +# OVERVIEW OF CHAPTER 1 (Beginner) + +**Galaxy Structure with PyAutoGalaxy** + +In chapter 1, we'll learn about galaxy structure and **PyAutoGalaxy**. At the end, you'll be able to: + +1. Create uniform grid's of (x,y) Cartesian coordinates. +2. Combine these grid's with light profiles to make images. +3. Combine these light profiles to make galaxies. +4. Simulate telescope CCD imaging data of a galaxy. +5. Fit imaging data with model images generated via galaxy objects. + +# OVERVIEW OF CHAPTER 2 (Beginner) + +**Bayesian Inference and Non-linear Searches** + +In chapter 2, we'll cover Bayesian inference and model-fitting via a non-linear search. We will use these tools to +fit CCD imaging data of a galaxy with a model. At the end, you'll understand: + +1. The concept of a non-linear search and non-linear parameter space. +2. How to fit a model to galaxy CCD imaging via a non-linear search. +3. The trade-off between realism and complexity when choosing a model. +4. Why an incorrect model may be inferred and how to prevent this from happening. +5. The challenges that are involved in inferred a robust model in a computationally reasonable run-time. + +**Once completed, you'll be ready to model your own galaxies with PyAutoGalaxy!** + +# OVERVIEW OF CHAPTER 3 (Intermediate) + +**Automated Modeling with non-linear search chaining** + +In chapter 3, we'll learn how to chain multiple non-linear searches together to build automated modeling pipelines +which can: + +1. Break-down the fitting of a model using multiple non-linear searches and prior passing. +2. Use a custom pipeline to fit data containing multiple galaxy where each galaxy is fitted one at a time. +3. Fit the global structure of a galaxy, followed by faint morphological features like a bar. + +# OVERVIEW OF CHAPTER 4 (Intermediate) + +**Using an inverison to perform a pixelized morphology reconstructions** + +In chapter 4, we'll learn how to reconstruct morphology features of a galaxy using a pixel-grid, ensuring that we can +fit an accurate model to sources with complex and irregular morphologies. You'll learn how to: + +1. Pixelize a galaxy reconstruction into pixels. +2. Perform a linear inversion using this pixelization to reconstruct the galaxy's light. +3. Apply a smoothness prior on the galaxy reconstruction, called regularization. +4. Apply smoothing within a Bayesian framework to objectively quantify the reconstruction's complexity. +5. Use alternative pixelizations, for example a Voronoi mesh. +6. Use these features to fit a model via non-linear searches. diff --git a/notebooks/chapter_1_introduction/README.md b/notebooks/chapter_1_introduction/README.md new file mode 100644 index 0000000..c3bd17b --- /dev/null +++ b/notebooks/chapter_1_introduction/README.md @@ -0,0 +1,17 @@ +In chapter 1, we introduce you to strong gravitational lensing and the core **PyAutoGalaxy** API. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 0: Visualization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb) — Setting up **PyAutoGalaxy**'s visualization library. + +- [Tutorial 1: Grids And Galaxies](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb) — How grids of (y,x) coordinates are used to create images of galaxies that ultimately quantify their morphology. + +- [Tutorial 2: Data](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_2_data.ipynb) — Simulating and inspecting telescope imaging data of a galaxy, for example from the Hubble Space Telescope. + +- [Tutorial 3: Fitting](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb) — How to fit imaging data of a galaxy and quantify whether a fit is good or bad. + +- [Tutorial 4: Methods](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_4_methods.ipynb) — An overview of the different methods used to fit galaxies with. + +- [Tutorial 5: Summary](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_5_summary.ipynb) — A summary of the chapter. diff --git a/notebooks/chapter_1_introduction/README.rst b/notebooks/chapter_1_introduction/README.rst deleted file mode 100644 index ea74e04..0000000 --- a/notebooks/chapter_1_introduction/README.rst +++ /dev/null @@ -1,24 +0,0 @@ -In chapter 1, we introduce you to strong gravitational lensing and the core **PyAutoGalaxy** API. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 0: Visualization `_ -- Setting up **PyAutoGalaxy**'s visualization library. - -`Tutorial 1: Grids And Galaxies `_ -- How grids of (y,x) coordinates are used to create images of galaxies that ultimately quantify their morphology. - -`Tutorial 2: Data `_ -- Simulating and inspecting telescope imaging data of a galaxy, for example from the Hubble Space Telescope. - -`Tutorial 3: Fitting `_ -- How to fit imaging data of a galaxy and quantify whether a fit is good or bad. - -`Tutorial 4: Methods `_ -- An overview of the different methods used to fit galaxies with. - -`Tutorial 5: Summary `_ -- A summary of the chapter. \ No newline at end of file diff --git a/notebooks/chapter_2_modeling/README.md b/notebooks/chapter_2_modeling/README.md new file mode 100644 index 0000000..6ab2951 --- /dev/null +++ b/notebooks/chapter_2_modeling/README.md @@ -0,0 +1,21 @@ +In chapter 2, we'll take you through how to model galaxies using a non-linear search. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Non-linear Search](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb) — How a non-linear search is used to fit a model and the concepts of a parameter space and priors. + +- [Tutorial 2: Practicalities](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb) — Practicalities of performing model-fitting, like how to inspect the results on your hard-disk. + +- [Tutorial 3: Realism and Complexity](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb) — Finding a balance between realism and complexity when composing and fitting a model. + +- [Tutorial 4: Dealing with Failure](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb) — What to do when PyAutoGalaxy finds an inaccurate model. + +- [Tutorial 5: Linear Profiles](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb) — Light profiles which capture complex morphologies in a reduced number of non-linear parameters. + +- [Tutorial 6: Masking](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb) — How to mask your data to improve the model. + +- [Tutorial 7: Results](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_7_results.ipynb) — Overview of the results available after successfully fitting a model. + +- [Tutorial 8: Need for Speed](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_8_need_for_speed.ipynb) — How to fit complex models whilst balancing efficiency and run-time. diff --git a/notebooks/chapter_2_modeling/README.rst b/notebooks/chapter_2_modeling/README.rst deleted file mode 100644 index 722da2c..0000000 --- a/notebooks/chapter_2_modeling/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -In chapter 2, we'll take you through how to model galaxies using a non-linear search. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Non-linear Search `_ -- How a non-linear search is used to fit a model and the concepts of a parameter space and priors. - -`Tutorial 2: Practicalities `_ -- Practicalities of performing model-fitting, like how to inspect the results on your hard-disk. - -`Tutorial 3: Realism and Complexity `_ -- Finding a balance between realism and complexity when composing and fitting a model. - -`Tutorial 4: Dealing with Failure `_ -- What to do when PyAutoGalaxy finds an inaccurate model. - -`Tutorial 5: Linear Profiles `_ -- Light profiles which capture complex morphologies in a reduced number of non-linear parameters. - -`Tutorial 6: Masking `_ -- How to mask your data to improve the model. - -`Tutorial 7: Results `_ -- Overview of the results available after successfully fitting a model. - -`Tutorial 8: Need for Speed `_ -- How to fit complex models whilst balancing efficiency and run-time. diff --git a/notebooks/chapter_3_search_chaining/README.md b/notebooks/chapter_3_search_chaining/README.md new file mode 100644 index 0000000..21ece84 --- /dev/null +++ b/notebooks/chapter_3_search_chaining/README.md @@ -0,0 +1,18 @@ +In chapter 3, we introduce non-linear search chaining, whereby modeling pipelines are composed which each fit a +different model. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Search Chaining](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb) — Breaking the modeling procedure into a chained sequence of model-fits. + +- [Tutorial 2: Prior Passing](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb) — How the results of earlier searches are passed to later searches. + +- [Tutorial 3: Lens](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_3_lens_and_source.ipynb) — Fitting the galaxy's light followed by its mass using chained searches. + +- [Tutorial 4: Two Lens galaxies](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_4_x2_lens_galaxies.ipynb) — Modeling a galaxy with two lens galaxies using chained searches. + +- [Tutorial 5: Complex Source](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_4_complex_source.ipynb) — Using multiple light profiles to fit a complex and irregular source using chained searches. + +- [Tutorial 6: SLaM](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_6_slam.ipynb) — Template pipelines for fitting model is standardized ways. diff --git a/notebooks/chapter_3_search_chaining/README.rst b/notebooks/chapter_3_search_chaining/README.rst deleted file mode 100644 index 53d73a4..0000000 --- a/notebooks/chapter_3_search_chaining/README.rst +++ /dev/null @@ -1,25 +0,0 @@ -In chapter 3, we introduce non-linear search chaining, whereby modeling pipelines are composed which each fit a -different model. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Search Chaining `_ -- Breaking the modeling procedure into a chained sequence of model-fits. - -`Tutorial 2: Prior Passing `_ -- How the results of earlier searches are passed to later searches. - -`Tutorial 3: Lens `_ -- Fitting the galaxy's light followed by its mass using chained searches. - -`Tutorial 4: Two Lens galaxies `_ -- Modeling a galaxy with two lens galaxies using chained searches. - -`Tutorial 5: Complex Source `_ -- Using multiple light profiles to fit a complex and irregular source using chained searches. - -`Tutorial 6: SLaM `_ -- Template pipelines for fitting model is standardized ways. \ No newline at end of file diff --git a/notebooks/chapter_4_pixelizations/README.md b/notebooks/chapter_4_pixelizations/README.md new file mode 100644 index 0000000..2b0574a --- /dev/null +++ b/notebooks/chapter_4_pixelizations/README.md @@ -0,0 +1,21 @@ +In chapter 4, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Pixelizations](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_1_pixelizations.ipynb) — Creating a pixel-grid in the source-plane. + +- [Tutorial 2: Mappers](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb) — How a pixelization maps source-pixels to image-pixels. + +- [Tutorial 3: Inversions](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb) — Inverting the mappings to reconstruct the source's light. + +- [Tutorial 4: Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb) — Smoothing the source within a Bayesian framework. + +- [Tutorial 5: Borders](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_5_borders.ipynb) — Preventing highly demagnified image-pixels ruining the inversion. + +- [Tutorial 6: Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_6_modeling.ipynb) — How to use inversions to fit a model. + +- [Tutorial 7: Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_7_adaptive_pixelization.ipynb) — A Voronoi mesh which adapts to the mass model's magnification. + +- [Tutorial 8: Model Fit](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_8_model_fit.ipynb) — An example modeling pipeline which uses an inversion. diff --git a/notebooks/chapter_4_pixelizations/README.rst b/notebooks/chapter_4_pixelizations/README.rst deleted file mode 100644 index fc812fd..0000000 --- a/notebooks/chapter_4_pixelizations/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -In chapter 4, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Pixelizations `_ -- Creating a pixel-grid in the source-plane. - -`Tutorial 2: Mappers `_ -- How a pixelization maps source-pixels to image-pixels. - -`Tutorial 3: Inversions `_ -- Inverting the mappings to reconstruct the source's light. - -`Tutorial 4: Bayesian Regularization `_ -- Smoothing the source within a Bayesian framework. - -`Tutorial 5: Borders `_ -- Preventing highly demagnified image-pixels ruining the inversion. - -`Tutorial 6: Lens Modeling `_ -- How to use inversions to fit a model. - -`Tutorial 7: Adaptive Pixelization `_ -- A Voronoi mesh which adapts to the mass model's magnification. - -`Tutorial 8: Model Fit `_ -- An example modeling pipeline which uses an inversion. \ No newline at end of file diff --git a/scripts/README.rst b/scripts/README.md old mode 100755 new mode 100644 similarity index 58% rename from scripts/README.rst rename to scripts/README.md index dad49ba..dc57797 --- a/scripts/README.rst +++ b/scripts/README.md @@ -1,125 +1,115 @@ -The ``HowToGalaxy`` folder contains **HowToGalaxy** lectures, which teach a new user how to model a galaxy. - -Folders -------- - -- ``chapter_1_introduction``: An introduction to galaxy morphology and structure using **PyAutoGalaxy**. -- ``chapter_2_modeling``: How to model galaxies, including a primer on Bayesian non-linear analysis. -- ``chapter_3_search_chaining``: How to fit complex models using non-linear search chaining. -- ``chapter_4_pixelizations``: How to perform pixelized reconstructions of a galaxy. -- ``chapter_optional``: Optional tutorials. - -Full Explanation ----------------- - -Welcome to **HowToGalaxy** - The **PyAutoGalaxy** tutorial! - -HOW TO TACKLE HowToGalaxy ------------------------ - -The **HowToGalaxy** lecture series current sits at 4 chapters, and each will take a day or so to go through -properly. You probably want to be modeling galaxies faster than that! Furthermore, the concepts -in the later chapters are pretty challenging, and familiarity and modeling is desirable before -you tackle them. - -Therefore, we recommend that you complete chapters 1 & 2 and then apply what you've learnt to the modeling of simulated -and real galaxy data, using the scripts found in the 'autogalaxy_workspace'. Once you're happy -with the results and confident with your use of **PyAutoGalaxy**, you can then begin to cover the advanced functionality -covered in chapters 3 & 4. - -JUYPTER NOTEBOOKS ------------------ - -All tutorials are supplied as Jupyter Notebooks, which come with a '.ipynb' suffix. For those new to Python, Jupyter -Notebooks are a different way to write, view and use Python code. Compared to the traditional Python scripts, -they allow: - -- Small blocks of code to be viewed and run at a time. -- Images and visualization from a code to be displayed directly underneath it. -- Text script to appear between the blocks of code. - -This makes them an ideal way for us to present the **HowToGalaxy** lecture series, therefore I recommend you get yourself -a Jupyter notebook viewer (https://jupyter.org/) if you have not done so already. - -If you *really* want to use Python scripts, all tutorials are supplied a ```` python files in the 'scripts' folder of -each chapter. - -For actual **PyAutoGalaxy** use, I recommend you use Python scripts. Therefore, as you go through the lecture series -you will notice that we will transition you to Python scripts in the third chapter. - -VISUALIZATION -------------- - -Before beginning the **HowToGalaxy** lecture series, in chapter 1 you should do 'tutorial_0_visualization'. This will -take you through how **PyAutoGalaxy** interfaces with matplotlib to perform visualization and will get you setup such that -images and figures display correctly in your Jupyter notebooks. - -CODE STYLE AND FORMATTING -------------------------- - -When you begin the notebooks, you may notice the style and formatting of our Python code looks different to what you -are used to. For example, it is common for brackets to be placed on their own line at the end of function calls, -the inputs of a function or class may be listed over many separate lines and the code in general takes up a lot more -space then you are used to. - -This is intentional, because we believe it makes the cleanest, most readable code possible. In fact - lots of people do, -which is why we use an auto-formatter to produce the code in a standardized format. If you're interested in the style -and would like to adapt it to your own code, check out the Python auto-code formatter 'black'. - -https://github.com/python/black - -OVERVIEW OF CHAPTER 1 (Beginner) --------------------------------- - -**Galaxy Structure with PyAutoGalaxy** - -In chapter 1, we'll learn about galaxy structure and **PyAutoGalaxy**. At the end, you'll be able to: - -1) Create uniform grid's of (x,y) Cartesian coordinates. -2) Combine these grid's with light profiles to make images. -3) Combine these light profiles to make galaxies. -4) Simulate telescope CCD imaging data of a galaxy. -5) Fit imaging data with model images generated via galaxy objects. - -OVERVIEW OF CHAPTER 2 (Beginner) --------------------------------- - -**Bayesian Inference and Non-linear Searches** - -In chapter 2, we'll cover Bayesian inference and model-fitting via a non-linear search. We will use these tools to -fit CCD imaging data of a galaxy with a model. At the end, you'll understand: - -1) The concept of a non-linear search and non-linear parameter space. -2) How to fit a model to galaxy CCD imaging via a non-linear search. -3) The trade-off between realism and complexity when choosing a model. -4) Why an incorrect model may be inferred and how to prevent this from happening. -5) The challenges that are involved in inferred a robust model in a computationally reasonable run-time. - -**Once completed, you'll be ready to model your own galaxies with PyAutoGalaxy!** - -OVERVIEW OF CHAPTER 3 (Intermediate) ------------------------------------- - -**Automated Modeling with non-linear search chaining** - -In chapter 3, we'll learn how to chain multiple non-linear searches together to build automated modeling pipelines -which can: - -1) Break-down the fitting of a model using multiple non-linear searches and prior passing. -2) Use a custom pipeline to fit data containing multiple galaxy where each galaxy is fitted one at a time. -3) Fit the global structure of a galaxy, followed by faint morphological features like a bar. - -OVERVIEW OF CHAPTER 4 (Intermediate) ------------------------------------- - -**Using an inverison to perform a pixelized morphology reconstructions** - -In chapter 4, we'll learn how to reconstruct morphology features of a galaxy using a pixel-grid, ensuring that we can -fit an accurate model to sources with complex and irregular morphologies. You'll learn how to: - -1) Pixelize a galaxy reconstruction into pixels. -2) Perform a linear inversion using this pixelization to reconstruct the galaxy's light. -3) Apply a smoothness prior on the galaxy reconstruction, called regularization. -4) Apply smoothing within a Bayesian framework to objectively quantify the reconstruction's complexity. -5) Use alternative pixelizations, for example a Voronoi mesh. -6) Use these features to fit a model via non-linear searches. \ No newline at end of file +The `HowToGalaxy` folder contains **HowToGalaxy** lectures, which teach a new user how to model a galaxy. + +# Folders + +- `chapter_1_introduction`: An introduction to galaxy morphology and structure using **PyAutoGalaxy**. +- `chapter_2_modeling`: How to model galaxies, including a primer on Bayesian non-linear analysis. +- `chapter_3_search_chaining`: How to fit complex models using non-linear search chaining. +- `chapter_4_pixelizations`: How to perform pixelized reconstructions of a galaxy. +- `chapter_optional`: Optional tutorials. + +# Full Explanation + +Welcome to **HowToGalaxy** - The **PyAutoGalaxy** tutorial! + +# HOW TO TACKLE HowToGalaxy + +The **HowToGalaxy** lecture series current sits at 4 chapters, and each will take a day or so to go through +properly. You probably want to be modeling galaxies faster than that! Furthermore, the concepts +in the later chapters are pretty challenging, and familiarity and modeling is desirable before +you tackle them. + +Therefore, we recommend that you complete chapters 1 & 2 and then apply what you've learnt to the modeling of simulated +and real galaxy data, using the scripts found in the 'autogalaxy_workspace'. Once you're happy +with the results and confident with your use of **PyAutoGalaxy**, you can then begin to cover the advanced functionality +covered in chapters 3 & 4. + +# JUYPTER NOTEBOOKS + +All tutorials are supplied as Jupyter Notebooks, which come with a '.ipynb' suffix. For those new to Python, Jupyter +Notebooks are a different way to write, view and use Python code. Compared to the traditional Python scripts, +they allow: + +- Small blocks of code to be viewed and run at a time. +- Images and visualization from a code to be displayed directly underneath it. +- Text script to appear between the blocks of code. + +This makes them an ideal way for us to present the **HowToGalaxy** lecture series, therefore I recommend you get yourself +a Jupyter notebook viewer () if you have not done so already. + +If you *really* want to use Python scripts, all tutorials are supplied a \`\` python files in the 'scripts' folder of +each chapter. + +For actual **PyAutoGalaxy** use, I recommend you use Python scripts. Therefore, as you go through the lecture series +you will notice that we will transition you to Python scripts in the third chapter. + +# VISUALIZATION + +Before beginning the **HowToGalaxy** lecture series, in chapter 1 you should do 'tutorial_0_visualization'. This will +take you through how **PyAutoGalaxy** interfaces with matplotlib to perform visualization and will get you setup such that +images and figures display correctly in your Jupyter notebooks. + +# CODE STYLE AND FORMATTING + +When you begin the notebooks, you may notice the style and formatting of our Python code looks different to what you +are used to. For example, it is common for brackets to be placed on their own line at the end of function calls, +the inputs of a function or class may be listed over many separate lines and the code in general takes up a lot more +space then you are used to. + +This is intentional, because we believe it makes the cleanest, most readable code possible. In fact - lots of people do, +which is why we use an auto-formatter to produce the code in a standardized format. If you're interested in the style +and would like to adapt it to your own code, check out the Python auto-code formatter 'black'. + + + +# OVERVIEW OF CHAPTER 1 (Beginner) + +**Galaxy Structure with PyAutoGalaxy** + +In chapter 1, we'll learn about galaxy structure and **PyAutoGalaxy**. At the end, you'll be able to: + +1. Create uniform grid's of (x,y) Cartesian coordinates. +2. Combine these grid's with light profiles to make images. +3. Combine these light profiles to make galaxies. +4. Simulate telescope CCD imaging data of a galaxy. +5. Fit imaging data with model images generated via galaxy objects. + +# OVERVIEW OF CHAPTER 2 (Beginner) + +**Bayesian Inference and Non-linear Searches** + +In chapter 2, we'll cover Bayesian inference and model-fitting via a non-linear search. We will use these tools to +fit CCD imaging data of a galaxy with a model. At the end, you'll understand: + +1. The concept of a non-linear search and non-linear parameter space. +2. How to fit a model to galaxy CCD imaging via a non-linear search. +3. The trade-off between realism and complexity when choosing a model. +4. Why an incorrect model may be inferred and how to prevent this from happening. +5. The challenges that are involved in inferred a robust model in a computationally reasonable run-time. + +**Once completed, you'll be ready to model your own galaxies with PyAutoGalaxy!** + +# OVERVIEW OF CHAPTER 3 (Intermediate) + +**Automated Modeling with non-linear search chaining** + +In chapter 3, we'll learn how to chain multiple non-linear searches together to build automated modeling pipelines +which can: + +1. Break-down the fitting of a model using multiple non-linear searches and prior passing. +2. Use a custom pipeline to fit data containing multiple galaxy where each galaxy is fitted one at a time. +3. Fit the global structure of a galaxy, followed by faint morphological features like a bar. + +# OVERVIEW OF CHAPTER 4 (Intermediate) + +**Using an inverison to perform a pixelized morphology reconstructions** + +In chapter 4, we'll learn how to reconstruct morphology features of a galaxy using a pixel-grid, ensuring that we can +fit an accurate model to sources with complex and irregular morphologies. You'll learn how to: + +1. Pixelize a galaxy reconstruction into pixels. +2. Perform a linear inversion using this pixelization to reconstruct the galaxy's light. +3. Apply a smoothness prior on the galaxy reconstruction, called regularization. +4. Apply smoothing within a Bayesian framework to objectively quantify the reconstruction's complexity. +5. Use alternative pixelizations, for example a Voronoi mesh. +6. Use these features to fit a model via non-linear searches. diff --git a/scripts/chapter_1_introduction/README.md b/scripts/chapter_1_introduction/README.md new file mode 100644 index 0000000..c3bd17b --- /dev/null +++ b/scripts/chapter_1_introduction/README.md @@ -0,0 +1,17 @@ +In chapter 1, we introduce you to strong gravitational lensing and the core **PyAutoGalaxy** API. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 0: Visualization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb) — Setting up **PyAutoGalaxy**'s visualization library. + +- [Tutorial 1: Grids And Galaxies](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_1_grids_and_galaxies.ipynb) — How grids of (y,x) coordinates are used to create images of galaxies that ultimately quantify their morphology. + +- [Tutorial 2: Data](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_2_data.ipynb) — Simulating and inspecting telescope imaging data of a galaxy, for example from the Hubble Space Telescope. + +- [Tutorial 3: Fitting](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb) — How to fit imaging data of a galaxy and quantify whether a fit is good or bad. + +- [Tutorial 4: Methods](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_4_methods.ipynb) — An overview of the different methods used to fit galaxies with. + +- [Tutorial 5: Summary](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_1_introduction/tutorial_5_summary.ipynb) — A summary of the chapter. diff --git a/scripts/chapter_1_introduction/README.rst b/scripts/chapter_1_introduction/README.rst deleted file mode 100644 index ea74e04..0000000 --- a/scripts/chapter_1_introduction/README.rst +++ /dev/null @@ -1,24 +0,0 @@ -In chapter 1, we introduce you to strong gravitational lensing and the core **PyAutoGalaxy** API. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 0: Visualization `_ -- Setting up **PyAutoGalaxy**'s visualization library. - -`Tutorial 1: Grids And Galaxies `_ -- How grids of (y,x) coordinates are used to create images of galaxies that ultimately quantify their morphology. - -`Tutorial 2: Data `_ -- Simulating and inspecting telescope imaging data of a galaxy, for example from the Hubble Space Telescope. - -`Tutorial 3: Fitting `_ -- How to fit imaging data of a galaxy and quantify whether a fit is good or bad. - -`Tutorial 4: Methods `_ -- An overview of the different methods used to fit galaxies with. - -`Tutorial 5: Summary `_ -- A summary of the chapter. \ No newline at end of file diff --git a/scripts/chapter_2_modeling/README.md b/scripts/chapter_2_modeling/README.md new file mode 100644 index 0000000..6ab2951 --- /dev/null +++ b/scripts/chapter_2_modeling/README.md @@ -0,0 +1,21 @@ +In chapter 2, we'll take you through how to model galaxies using a non-linear search. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Non-linear Search](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb) — How a non-linear search is used to fit a model and the concepts of a parameter space and priors. + +- [Tutorial 2: Practicalities](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb) — Practicalities of performing model-fitting, like how to inspect the results on your hard-disk. + +- [Tutorial 3: Realism and Complexity](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb) — Finding a balance between realism and complexity when composing and fitting a model. + +- [Tutorial 4: Dealing with Failure](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb) — What to do when PyAutoGalaxy finds an inaccurate model. + +- [Tutorial 5: Linear Profiles](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb) — Light profiles which capture complex morphologies in a reduced number of non-linear parameters. + +- [Tutorial 6: Masking](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb) — How to mask your data to improve the model. + +- [Tutorial 7: Results](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_7_results.ipynb) — Overview of the results available after successfully fitting a model. + +- [Tutorial 8: Need for Speed](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_2_modeling/tutorial_8_need_for_speed.ipynb) — How to fit complex models whilst balancing efficiency and run-time. diff --git a/scripts/chapter_2_modeling/README.rst b/scripts/chapter_2_modeling/README.rst deleted file mode 100644 index 722da2c..0000000 --- a/scripts/chapter_2_modeling/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -In chapter 2, we'll take you through how to model galaxies using a non-linear search. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Non-linear Search `_ -- How a non-linear search is used to fit a model and the concepts of a parameter space and priors. - -`Tutorial 2: Practicalities `_ -- Practicalities of performing model-fitting, like how to inspect the results on your hard-disk. - -`Tutorial 3: Realism and Complexity `_ -- Finding a balance between realism and complexity when composing and fitting a model. - -`Tutorial 4: Dealing with Failure `_ -- What to do when PyAutoGalaxy finds an inaccurate model. - -`Tutorial 5: Linear Profiles `_ -- Light profiles which capture complex morphologies in a reduced number of non-linear parameters. - -`Tutorial 6: Masking `_ -- How to mask your data to improve the model. - -`Tutorial 7: Results `_ -- Overview of the results available after successfully fitting a model. - -`Tutorial 8: Need for Speed `_ -- How to fit complex models whilst balancing efficiency and run-time. diff --git a/scripts/chapter_3_search_chaining/README.md b/scripts/chapter_3_search_chaining/README.md new file mode 100644 index 0000000..21ece84 --- /dev/null +++ b/scripts/chapter_3_search_chaining/README.md @@ -0,0 +1,18 @@ +In chapter 3, we introduce non-linear search chaining, whereby modeling pipelines are composed which each fit a +different model. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Search Chaining](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb) — Breaking the modeling procedure into a chained sequence of model-fits. + +- [Tutorial 2: Prior Passing](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb) — How the results of earlier searches are passed to later searches. + +- [Tutorial 3: Lens](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_3_lens_and_source.ipynb) — Fitting the galaxy's light followed by its mass using chained searches. + +- [Tutorial 4: Two Lens galaxies](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_4_x2_lens_galaxies.ipynb) — Modeling a galaxy with two lens galaxies using chained searches. + +- [Tutorial 5: Complex Source](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_4_complex_source.ipynb) — Using multiple light profiles to fit a complex and irregular source using chained searches. + +- [Tutorial 6: SLaM](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_3_search_chaining/tutorial_6_slam.ipynb) — Template pipelines for fitting model is standardized ways. diff --git a/scripts/chapter_3_search_chaining/README.rst b/scripts/chapter_3_search_chaining/README.rst deleted file mode 100644 index 53d73a4..0000000 --- a/scripts/chapter_3_search_chaining/README.rst +++ /dev/null @@ -1,25 +0,0 @@ -In chapter 3, we introduce non-linear search chaining, whereby modeling pipelines are composed which each fit a -different model. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Search Chaining `_ -- Breaking the modeling procedure into a chained sequence of model-fits. - -`Tutorial 2: Prior Passing `_ -- How the results of earlier searches are passed to later searches. - -`Tutorial 3: Lens `_ -- Fitting the galaxy's light followed by its mass using chained searches. - -`Tutorial 4: Two Lens galaxies `_ -- Modeling a galaxy with two lens galaxies using chained searches. - -`Tutorial 5: Complex Source `_ -- Using multiple light profiles to fit a complex and irregular source using chained searches. - -`Tutorial 6: SLaM `_ -- Template pipelines for fitting model is standardized ways. \ No newline at end of file diff --git a/scripts/chapter_4_pixelizations/README.md b/scripts/chapter_4_pixelizations/README.md new file mode 100644 index 0000000..2b0574a --- /dev/null +++ b/scripts/chapter_4_pixelizations/README.md @@ -0,0 +1,21 @@ +In chapter 4, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. + +**Colab** links to every tutorial are included. + +# Files + +- [Tutorial 1: Pixelizations](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_1_pixelizations.ipynb) — Creating a pixel-grid in the source-plane. + +- [Tutorial 2: Mappers](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb) — How a pixelization maps source-pixels to image-pixels. + +- [Tutorial 3: Inversions](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb) — Inverting the mappings to reconstruct the source's light. + +- [Tutorial 4: Bayesian Regularization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb) — Smoothing the source within a Bayesian framework. + +- [Tutorial 5: Borders](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_5_borders.ipynb) — Preventing highly demagnified image-pixels ruining the inversion. + +- [Tutorial 6: Lens Modeling](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_6_modeling.ipynb) — How to use inversions to fit a model. + +- [Tutorial 7: Adaptive Pixelization](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_7_adaptive_pixelization.ipynb) — A Voronoi mesh which adapts to the mass model's magnification. + +- [Tutorial 8: Model Fit](https://colab.research.google.com/github/PyAutoLabs/autogalaxy_workspace/blob/2026.5.1.4/notebooks/chapter_4_pixelizations/tutorial_8_model_fit.ipynb) — An example modeling pipeline which uses an inversion. diff --git a/scripts/chapter_4_pixelizations/README.rst b/scripts/chapter_4_pixelizations/README.rst deleted file mode 100644 index fc812fd..0000000 --- a/scripts/chapter_4_pixelizations/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -In chapter 4, we use **Pixelizations** to reconstruct complex source galaxies on pixelized grids. - -**Colab** links to every tutorial are included. - -Files ------ - -`Tutorial 1: Pixelizations `_ -- Creating a pixel-grid in the source-plane. - -`Tutorial 2: Mappers `_ -- How a pixelization maps source-pixels to image-pixels. - -`Tutorial 3: Inversions `_ -- Inverting the mappings to reconstruct the source's light. - -`Tutorial 4: Bayesian Regularization `_ -- Smoothing the source within a Bayesian framework. - -`Tutorial 5: Borders `_ -- Preventing highly demagnified image-pixels ruining the inversion. - -`Tutorial 6: Lens Modeling `_ -- How to use inversions to fit a model. - -`Tutorial 7: Adaptive Pixelization `_ -- A Voronoi mesh which adapts to the mass model's magnification. - -`Tutorial 8: Model Fit `_ -- An example modeling pipeline which uses an inversion. \ No newline at end of file