Skip to content

Commit ce310ba

Browse files
Jammy2211Jammy2211
authored andcommitted
docs: render __Contents__ blocks as Markdown lists
Without bullet markers, GitHub and JupyterLab collapse the contents block into one paragraph in the generated notebook's first markdown cell. Prefixing each `**Section:**` line with `- ` makes it render as a list. Continuation lines are indented two spaces so they belong to the same list item. Text-only edit inside top-level module docstrings — no Python or notebook execution change. Refs: PyAutoLabs/autolens_workspace#138
1 parent c65e464 commit ce310ba

21 files changed

Lines changed: 131 additions & 131 deletions

scripts/chapter_1_introduction/tutorial_0_visualization.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
88
__Contents__
99
10-
**Directories:** Set the working directory so PyAutoGalaxy can find configs, data and output folders.
11-
**Dataset:** Load an example imaging dataset of a galaxy.
12-
**Plot Customization:** Customize matplotlib options like title, figure size and colormap.
13-
**Subplots:** Plot all components of a dataset simultaneously using subplots.
14-
**Visuals:** Add visual overlays like masks and grids to figures.
15-
**Wrap Up:** Summary of visualization in PyAutoGalaxy.
10+
- **Directories:** Set the working directory so PyAutoGalaxy can find configs, data and output folders.
11+
- **Dataset:** Load an example imaging dataset of a galaxy.
12+
- **Plot Customization:** Customize matplotlib options like title, figure size and colormap.
13+
- **Subplots:** Plot all components of a dataset simultaneously using subplots.
14+
- **Visuals:** Add visual overlays like masks and grids to figures.
15+
- **Wrap Up:** Summary of visualization in PyAutoGalaxy.
1616
"""
1717

1818
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_1_introduction/tutorial_1_grids_and_galaxies.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
3232
__Contents__
3333
34-
**Grids:** Create a uniform grid of (y,x) coordinates and show how it can be used to measure the light of a galaxy.
35-
**Geometry:** How to shift and rotate a grid, and convert it to elliptical coordinates.
36-
**Light Profiles:** Using light profiles, analytic functions that describe how a galaxy's light is distributed.
37-
**Galaxies:** Creating galaxies containing light profiles and computing the image of a galaxy.
38-
**One Dimension Projection:** Create projected 2D radial grids for 1D profile calculations.
39-
**Unit Conversion:** Converting angular distances to physical distances using cosmology.
40-
**Wrap Up:** Summary of the key concepts covered in this tutorial.
34+
- **Grids:** Create a uniform grid of (y,x) coordinates and show how it can be used to measure the light of a galaxy.
35+
- **Geometry:** How to shift and rotate a grid, and convert it to elliptical coordinates.
36+
- **Light Profiles:** Using light profiles, analytic functions that describe how a galaxy's light is distributed.
37+
- **Galaxies:** Creating galaxies containing light profiles and computing the image of a galaxy.
38+
- **One Dimension Projection:** Create projected 2D radial grids for 1D profile calculations.
39+
- **Unit Conversion:** Converting angular distances to physical distances using cosmology.
40+
- **Wrap Up:** Summary of the key concepts covered in this tutorial.
4141
4242
The imports below are required to run the howtogalaxy tutorials in a Jupiter notebook. They also import the
4343
`autogalaxy` package and the `autogalaxy.plot` module which are used throughout the tutorials.

scripts/chapter_1_introduction/tutorial_2_data.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
2121
__Contents__
2222
23-
**Initial Setup:** Create a 2D grid and define galaxy light profiles for simulation.
24-
**Optics Blurring:** Simulate how the telescope optics blur the galaxy's light using PSF convolution.
25-
**Poisson Noise:** Add Poisson noise to the image, simulating CCD photon-to-electron randomness.
26-
**Background Sky:** Add background sky light that introduces noise across the entire image.
27-
**Simulator:** Use the SimulatorImaging object to simulate imaging data with all effects combined.
28-
**Output:** Save the simulated data to .fits files for use in future tutorials.
29-
**Wrap Up:** Summary of how CCD imaging data is simulated.
23+
- **Initial Setup:** Create a 2D grid and define galaxy light profiles for simulation.
24+
- **Optics Blurring:** Simulate how the telescope optics blur the galaxy's light using PSF convolution.
25+
- **Poisson Noise:** Add Poisson noise to the image, simulating CCD photon-to-electron randomness.
26+
- **Background Sky:** Add background sky light that introduces noise across the entire image.
27+
- **Simulator:** Use the SimulatorImaging object to simulate imaging data with all effects combined.
28+
- **Output:** Save the simulated data to .fits files for use in future tutorials.
29+
- **Wrap Up:** Summary of how CCD imaging data is simulated.
3030
"""
3131

3232
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_1_introduction/tutorial_3_fitting.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
2222
__Contents__
2323
24-
**Dataset:** Load the imaging dataset previously simulated, consisting of the image, noise map, and PSF.
25-
**Mask:** Apply a mask to the data, excluding regions with low signal-to-noise ratios from the analysis.
26-
**Masked Grid:** Create a masked grid containing only coordinates of unmasked pixels.
27-
**Fitting:** Fit the data with a galaxy model, computing the model image, residuals, chi-squared, and log likelihood.
28-
**Incorrect Fit:** Demonstrate how small deviations from true parameters impact fit quality.
29-
**Model Fitting:** Perform a basic model fit, adjusting parameters to improve the fit.
30-
**Wrap Up:** Summary of the fitting process and key statistical concepts.
24+
- **Dataset:** Load the imaging dataset previously simulated, consisting of the image, noise map, and PSF.
25+
- **Mask:** Apply a mask to the data, excluding regions with low signal-to-noise ratios from the analysis.
26+
- **Masked Grid:** Create a masked grid containing only coordinates of unmasked pixels.
27+
- **Fitting:** Fit the data with a galaxy model, computing the model image, residuals, chi-squared, and log likelihood.
28+
- **Incorrect Fit:** Demonstrate how small deviations from true parameters impact fit quality.
29+
- **Model Fitting:** Perform a basic model fit, adjusting parameters to improve the fit.
30+
- **Wrap Up:** Summary of the fitting process and key statistical concepts.
3131
"""
3232

3333
import numpy as np

scripts/chapter_1_introduction/tutorial_5_summary.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
1818
__Contents__
1919
20-
**Initial Setup:** Create profiles, galaxies and a Galaxies object for illustration.
21-
**Object Composition:** How Galaxies, Galaxy and Profile objects compose together.
22-
**Visualization:** Customize and visualize any aspect of galaxies using the plotting API.
23-
**Code Design:** Discussion of PyAutoGalaxy's object-oriented design philosophy.
24-
**Source Code:** Links to the source code repositories for PyAutoFit, PyAutoArray and PyAutoGalaxy.
25-
**Wrap Up:** Summary of chapter 1 and preview of the modeling chapter.
20+
- **Initial Setup:** Create profiles, galaxies and a Galaxies object for illustration.
21+
- **Object Composition:** How Galaxies, Galaxy and Profile objects compose together.
22+
- **Visualization:** Customize and visualize any aspect of galaxies using the plotting API.
23+
- **Code Design:** Discussion of PyAutoGalaxy's object-oriented design philosophy.
24+
- **Source Code:** Links to the source code repositories for PyAutoFit, PyAutoArray and PyAutoGalaxy.
25+
- **Wrap Up:** Summary of chapter 1 and preview of the modeling chapter.
2626
"""
2727

2828
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
2020
__Contents__
2121
22-
**Initial Setup:** Load the dataset and apply a mask.
23-
**Model + Search + Analysis:** Compose a bulge+disk model and fit it using Nautilus.
24-
**Result:** Inspect the result and compare to the true model.
25-
**Global and Local Maxima:** Demonstrate how the search can infer incorrect local maxima solutions.
26-
**Wrap Up:** Summary of the challenges of fitting more complex and realistic models.
22+
- **Initial Setup:** Load the dataset and apply a mask.
23+
- **Model + Search + Analysis:** Compose a bulge+disk model and fit it using Nautilus.
24+
- **Result:** Inspect the result and compare to the true model.
25+
- **Global and Local Maxima:** Demonstrate how the search can infer incorrect local maxima solutions.
26+
- **Wrap Up:** Summary of the challenges of fitting more complex and realistic models.
2727
"""
2828

2929
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
2121
__Contents__
2222
23-
**Initial Setup:** Load the dataset and apply a mask.
24-
**Approach 1: Prior Tuning:** Narrow the priors to guide the search to the correct region of parameter space.
25-
**Approach 2: Reducing Complexity:** Simplify the model to reduce the dimensionality of parameter space.
26-
**Approach 3: Look Harder:** Increase the thoroughness of the non-linear search sampling.
23+
- **Initial Setup:** Load the dataset and apply a mask.
24+
- **Approach 1: Prior Tuning:** Narrow the priors to guide the search to the correct region of parameter space.
25+
- **Approach 2: Reducing Complexity:** Simplify the model to reduce the dimensionality of parameter space.
26+
- **Approach 3: Look Harder:** Increase the thoroughness of the non-linear search sampling.
2727
"""
2828

2929
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_2_modeling/tutorial_5_linear_profiles.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
2626
__Contents__
2727
28-
**Initial Setup:** Load the dataset and apply a mask.
29-
**Linear Light Profiles:** Fit a model using linear light profiles that solve for intensity via linear algebra.
30-
**Run Time:** Estimate the run time of the model-fit before starting.
31-
**Result:** Inspect the result and the solved intensity values.
32-
**Intensities:** Access the intensity values of linear light profiles after the fit.
33-
**Visualization:** Visualize the fit using linear light profiles.
34-
**Basis:** Combine many linear light profiles into a basis for fitting complex structures.
35-
**Model Fit:** Fit the basis model to the data.
36-
**Disk MGE:** Use a Multi-Gaussian Expansion for the disk component.
37-
**Multi Gaussian Expansion Benefits:** Discussion of the advantages of MGE models.
38-
**Positive Only Solver:** Ensure linear algebra solutions have positive intensity values.
39-
**Other Basis Functions:** Overview of other basis functions like shapelets.
40-
**Wrap Up:** Summary of linear light profiles and basis functions.
28+
- **Initial Setup:** Load the dataset and apply a mask.
29+
- **Linear Light Profiles:** Fit a model using linear light profiles that solve for intensity via linear algebra.
30+
- **Run Time:** Estimate the run time of the model-fit before starting.
31+
- **Result:** Inspect the result and the solved intensity values.
32+
- **Intensities:** Access the intensity values of linear light profiles after the fit.
33+
- **Visualization:** Visualize the fit using linear light profiles.
34+
- **Basis:** Combine many linear light profiles into a basis for fitting complex structures.
35+
- **Model Fit:** Fit the basis model to the data.
36+
- **Disk MGE:** Use a Multi-Gaussian Expansion for the disk component.
37+
- **Multi Gaussian Expansion Benefits:** Discussion of the advantages of MGE models.
38+
- **Positive Only Solver:** Ensure linear algebra solutions have positive intensity values.
39+
- **Other Basis Functions:** Overview of other basis functions like shapelets.
40+
- **Wrap Up:** Summary of linear light profiles and basis functions.
4141
"""
4242

4343
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_2_modeling/tutorial_6_masking.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
99
__Contents__
1010
11-
**Initial Setup:** Load the dataset and apply a mask.
12-
**Mask:** Apply a custom mask to focus the fit on specific regions.
13-
**Model + Search + Analysis:** Fit the model using the custom mask.
14-
**Discussion:** How the mask affects the fit quality and run time.
15-
**Wrap Up:** Summary of masking strategies for galaxy modeling.
11+
- **Initial Setup:** Load the dataset and apply a mask.
12+
- **Mask:** Apply a custom mask to focus the fit on specific regions.
13+
- **Model + Search + Analysis:** Fit the model using the custom mask.
14+
- **Discussion:** How the mask affects the fit quality and run time.
15+
- **Wrap Up:** Summary of masking strategies for galaxy modeling.
1616
"""
1717

1818
# from autoconf import setup_notebook; setup_notebook()

scripts/chapter_2_modeling/tutorial_7_results.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
88
__Contents__
99
10-
**Initial Setup:** Perform a model-fit to obtain a Result object.
11-
**Galaxies & Fit:** Access the maximum likelihood galaxies and fit from the result.
12-
**Samples:** Inspect the non-linear search samples, including parameter estimates and errors.
13-
**Workspace:** Pointers to more detailed results examples in the workspace.
14-
**Database:** Overview of the database functionality for managing large numbers of results.
15-
**Wrap Up:** Summary of the Result object and its key attributes.
10+
- **Initial Setup:** Perform a model-fit to obtain a Result object.
11+
- **Galaxies & Fit:** Access the maximum likelihood galaxies and fit from the result.
12+
- **Samples:** Inspect the non-linear search samples, including parameter estimates and errors.
13+
- **Workspace:** Pointers to more detailed results examples in the workspace.
14+
- **Database:** Overview of the database functionality for managing large numbers of results.
15+
- **Wrap Up:** Summary of the Result object and its key attributes.
1616
"""
1717

1818
# from autoconf import setup_notebook; setup_notebook()

0 commit comments

Comments
 (0)