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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/chapter_1_introduction/tutorial_0_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

__Contents__

**Directories:** **PyAutoLens assumes** the working directory is `autolens_workspace` on your hard-disk.
**Dataset:** Load and plot the strong lens dataset.
**Subplots:** In addition to plotting individual figures, **PyAutoLens** can plot `subplots` which show multiple.
**Plot Customization:** Does the figure display correctly on your computer screen?
**Overlays:** Overlays such as critical curves and image positions are added using the `lines=` and `positions=`.
**Wrap Up:** Summary of the script and next steps.
- **Directories:** **PyAutoLens assumes** the working directory is `autolens_workspace` on your hard-disk.
- **Dataset:** Load and plot the strong lens dataset.
- **Subplots:** In addition to plotting individual figures, **PyAutoLens** can plot `subplots` which show multiple.
- **Plot Customization:** Does the figure display correctly on your computer screen?
- **Overlays:** Overlays such as critical curves and image positions are added using the `lines=` and `positions=`.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@

__Contents__

**Grids:** A `Grid2D` is a set of two-dimensional $(y,x)$ coordinates that represent points in space where we.
**Geometry:** The above grid is centered on the origin (0.0", 0.0").
**Light Profiles:** Galaxies are collections of stars, gas, dust, and other astronomical objects that emit light.
**One Dimension Projection:** We often want to calculative 1D quantities of a light profile, for example to plot how its light.
- **Grids:** A `Grid2D` is a set of two-dimensional $(y,x)$ coordinates that represent points in space where we.
- **Geometry:** The above grid is centered on the origin (0.0", 0.0").
- **Light Profiles:** Galaxies are collections of stars, gas, dust, and other astronomical objects that emit light.
- **One Dimension Projection:** We often want to calculative 1D quantities of a light profile, for example to plot how its light.

"""

Expand Down
4 changes: 2 additions & 2 deletions scripts/chapter_1_introduction/tutorial_2_ray_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@

__Contents__

**Grid:** In the previous tutorial, we created 2D grids of (y,x) coordinates and showed how shifting and.
**Mass Profiles:** To perform lensing calculations, we use mass profiles available in the `mass_profile` module.
- **Grid:** In the previous tutorial, we created 2D grids of (y,x) coordinates and showed how shifting and.
- **Mass Profiles:** To perform lensing calculations, we use mass profiles available in the `mass_profile` module.

"""

Expand Down
16 changes: 8 additions & 8 deletions scripts/chapter_1_introduction/tutorial_3_more_ray_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

__Contents__

**Initial Setup:** To begin, lets setup the grid we'll ray-trace using.
**Concise Code:** Lets set up the tracer used in the previous tutorial.
**Critical Curves:** To end, we can finally explain what the black lines that have appeared on many of the plots.
**Caustics:** In the previous tutorial, we plotted the critical curves of the mass profile on the image-plane.
**Units:** Lets plot the lensing quantities again.
**More Complexity:** We now make a lens with some attributes we didn`t in the last tutorial.
**Multi Galaxy Ray Tracing:** Now lets pass our 4 galaxies to a `Tracer`, which means the following will occur.
**Wrap Up:** Summary of the script and next steps.
- **Initial Setup:** To begin, lets setup the grid we'll ray-trace using.
- **Concise Code:** Lets set up the tracer used in the previous tutorial.
- **Critical Curves:** To end, we can finally explain what the black lines that have appeared on many of the plots.
- **Caustics:** In the previous tutorial, we plotted the critical curves of the mass profile on the image-plane.
- **Units:** Lets plot the lensing quantities again.
- **More Complexity:** We now make a lens with some attributes we didn`t in the last tutorial.
- **Multi Galaxy Ray Tracing:** Now lets pass our 4 galaxies to a `Tracer`, which means the following will occur.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
2 changes: 1 addition & 1 deletion scripts/chapter_1_introduction/tutorial_4_point_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

__Contents__

**Wrap Up:** Summary of the script and next steps.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

__Contents__

**Wrap Up:** Summary of the script and next steps.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
14 changes: 7 additions & 7 deletions scripts/chapter_1_introduction/tutorial_6_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

__Contents__

**Initial Setup:** To create our simulated strong lens image, we first need a 2D grid.
**Optics Blurring:** All images captured using CCDs (like those on the Hubble Space Telescope or Euclid) experience some.
**Poisson Noise:** In addition to the blurring caused by telescope optics, we also need to consider Poisson noise when.
**Background Sky:** The final effect we will consider when simulating imaging data is the background sky.
**Simulator:** The `SimulatorImaging` object lets us create simulated imaging data while including the effects of.
**Output:** We will now save these simulated data to `.fits` files, the standard format used by astronomers for.
**Wrap Up:** Summary of the script and next steps.
- **Initial Setup:** To create our simulated strong lens image, we first need a 2D grid.
- **Optics Blurring:** All images captured using CCDs (like those on the Hubble Space Telescope or Euclid) experience some.
- **Poisson Noise:** In addition to the blurring caused by telescope optics, we also need to consider Poisson noise when.
- **Background Sky:** The final effect we will consider when simulating imaging data is the background sky.
- **Simulator:** The `SimulatorImaging` object lets us create simulated imaging data while including the effects of.
- **Output:** We will now save these simulated data to `.fits` files, the standard format used by astronomers for.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
12 changes: 6 additions & 6 deletions scripts/chapter_1_introduction/tutorial_7_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@

__Contents__

**Dataset & Mask:** Standard set up of the dataset and mask that is fitted.
**Masked Grid:** In tutorials 1 and 2, we emphasized that the `Grid2D` object is crucial for evaluating a lens's.
**Fitting:** Fit the lens model to the dataset and inspect the results.
**Incorrect Fit:** In the previous section, we successfully created and fitted a lens model to the image data.
**Model Fitting:** In the previous sections, we used the true model to fit the data, which resulted in a high log.
**Wrap Up:** Summary of the script and next steps.
- **Dataset & Mask:** Standard set up of the dataset and mask that is fitted.
- **Masked Grid:** In tutorials 1 and 2, we emphasized that the `Grid2D` object is crucial for evaluating a lens's.
- **Fitting:** Fit the lens model to the dataset and inspect the results.
- **Incorrect Fit:** In the previous section, we successfully created and fitted a lens model to the image data.
- **Model Fitting:** In the previous sections, we used the true model to fit the data, which resulted in a high log.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
12 changes: 6 additions & 6 deletions scripts/chapter_1_introduction/tutorial_8_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

__Contents__

**Start:** Below, we do all the steps we have learned this chapter, making profiles, galaxies, a tracer, etc.
**Object Composition:** Lets now consider how all of the objects we've covered throughout this chapter (`LightProfile`'s.
**Visualization:** Furthermore, using the `MatPLot2D` and `lines=`/`positions=` overlays objects we can visualize any.
**Code Design:** To end, I want to quickly talk about the **PyAutoLens** code-design and structure, which was really.
**Source Code:** If you do enjoy code, variables, functions, and parameters, you may want to dig deeper into the.
**Wrap Up:** Summary of the script and next steps.
- **Start:** Below, we do all the steps we have learned this chapter, making profiles, galaxies, a tracer, etc.
- **Object Composition:** Lets now consider how all of the objects we've covered throughout this chapter (`LightProfile`'s.
- **Visualization:** Furthermore, using the `MatPLot2D` and `lines=`/`positions=` overlays objects we can visualize any.
- **Code Design:** To end, I want to quickly talk about the **PyAutoLens** code-design and structure, which was really.
- **Source Code:** If you do enjoy code, variables, functions, and parameters, you may want to dig deeper into the.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
26 changes: 13 additions & 13 deletions scripts/chapter_2_lens_modeling/tutorial_1_non_linear_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@

__Contents__

**Overview:** In this tutorial, we will use a non-linear search to fit a lens model to simulated imaging of.
**Parameter Space:** In mathematics, a function is defined by its parameters, which map inputs to outputs.
**Search Types:** There are different types of non-linear searches, each of which explores parameter space in a.
**Deeper Background:** **The descriptions of how searches work in this example are simplfied and phoenomenological and do.
**PyAutoFit:** Modeling uses the probabilistic programming language.
**Initial Setup:** Let's first load the `Imaging` dataset, which we will use to fit a model with a non-linear search.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Model:** Compose the lens model fitted to the data.
**Priors:** When we examine the `.info` of our model, we notice that each parameter (like `centre`.
**Analysis:** Create the Analysis object that defines how the model is fitted to the data.
**Searches:** To perform a non-linear search, we create an instance of a `NonLinearSearch` object.
**Nested Sampling:** **Nested Sampling** is an advanced method for model-fitting that excels in handling complex models.
**Wrap Up:** Summary of the script and next steps.
- **Overview:** In this tutorial, we will use a non-linear search to fit a lens model to simulated imaging of.
- **Parameter Space:** In mathematics, a function is defined by its parameters, which map inputs to outputs.
- **Search Types:** There are different types of non-linear searches, each of which explores parameter space in a.
- **Deeper Background:** **The descriptions of how searches work in this example are simplfied and phoenomenological and do.
- **PyAutoFit:** Modeling uses the probabilistic programming language.
- **Initial Setup:** Let's first load the `Imaging` dataset, which we will use to fit a model with a non-linear search.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Model:** Compose the lens model fitted to the data.
- **Priors:** When we examine the `.info` of our model, we notice that each parameter (like `centre`.
- **Analysis:** Create the Analysis object that defines how the model is fitted to the data.
- **Searches:** To perform a non-linear search, we create an instance of a `NonLinearSearch` object.
- **Nested Sampling:** **Nested Sampling** is an advanced method for model-fitting that excels in handling complex models.
- **Wrap Up:** Summary of the script and next steps.

__Parameter Space__

Expand Down
34 changes: 17 additions & 17 deletions scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@

__Contents__

**PyAutoFit:** Modeling uses the probabilistic programming language.
**Initial Setup:** Lets first load the `Imaging` dataset we'll fit a model with using a non-linear search.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Model:** Compose the lens model fitted to the data.
**Search:** Configure the non-linear search used to fit the model.
**Search Settings:** Nautilus samples parameter space by placing "live points" representing different galaxy models.
**Iterations Per Update:** Every N iterations, the non-linear search outputs the current results to the folder.
**Analysis:** Create the Analysis object that defines how the model is fitted to the data.
**VRAM Use:** When running AutoLens with JAX on a GPU, the analysis must fit within the GPU’s available VRAM.
**Run Times:** Profiling the expected run time of the model-fit.
**Result Info:** A concise readable summary of the results is given by printing its `info` attribute.
**Output Folder:** Now checkout the `autolens_workspace/output` folder.
**Unique Identifier:** In the output folder, you will note that results are in a folder which is a collection of random.
**Output Folder Contents:** Now this is running you should checkout the `autolens_workspace/output` folder.
**Result:** Overview of the results of the model-fit.
**Other Practicalities:** The following are examples of other practicalities which I will document fully in this example.
**Wrap Up:** Summary of the script and next steps.
- **PyAutoFit:** Modeling uses the probabilistic programming language.
- **Initial Setup:** Lets first load the `Imaging` dataset we'll fit a model with using a non-linear search.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Model:** Compose the lens model fitted to the data.
- **Search:** Configure the non-linear search used to fit the model.
- **Search Settings:** Nautilus samples parameter space by placing "live points" representing different galaxy models.
- **Iterations Per Update:** Every N iterations, the non-linear search outputs the current results to the folder.
- **Analysis:** Create the Analysis object that defines how the model is fitted to the data.
- **VRAM Use:** When running AutoLens with JAX on a GPU, the analysis must fit within the GPU’s available VRAM.
- **Run Times:** Profiling the expected run time of the model-fit.
- **Result Info:** A concise readable summary of the results is given by printing its `info` attribute.
- **Output Folder:** Now checkout the `autolens_workspace/output` folder.
- **Unique Identifier:** In the output folder, you will note that results are in a folder which is a collection of random.
- **Output Folder Contents:** Now this is running you should checkout the `autolens_workspace/output` folder.
- **Result:** Overview of the results of the model-fit.
- **Other Practicalities:** The following are examples of other practicalities which I will document fully in this example.
- **Wrap Up:** Summary of the script and next steps.

__Search Settings__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

__Contents__

**Initial Setup:** we'll use new strong lensing data, where.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Model:** Compose the lens model fitted to the data.
**Run Time:** Profiling the expected run time of the model-fit.
**Result:** Overview of the results of the model-fit.
**Global and Local Maxima:** Up to now, all our non-linear searches have successfully found lens models that provide visibly.
**Wrap Up:** Summary of the script and next steps.
- **Initial Setup:** we'll use new strong lensing data, where.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Model:** Compose the lens model fitted to the data.
- **Run Time:** Profiling the expected run time of the model-fit.
- **Result:** Overview of the results of the model-fit.
- **Global and Local Maxima:** Up to now, all our non-linear searches have successfully found lens models that provide visibly.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

__Contents__

**Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Prior Tuning:** First, we will try to assist our non-linear search by tuning our priors.
**Run Time:** Profiling the expected run time of the model-fit.
**Result:** Overview of the results of the model-fit.
**Discussion:** By tuning our priors to the specific lens model we are fitting, we increase the chances of finding.
- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Prior Tuning:** First, we will try to assist our non-linear search by tuning our priors.
- **Run Time:** Profiling the expected run time of the model-fit.
- **Result:** Overview of the results of the model-fit.
- **Discussion:** By tuning our priors to the specific lens model we are fitting, we increase the chances of finding.

"""

Expand Down
30 changes: 15 additions & 15 deletions scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@

__Contents__

**Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Linear Light Profiles:** We use a variant of a light profile discussed called a "linear light profile", which is accessed.
**Run Time:** Profiling the expected run time of the model-fit.
**Result:** Overview of the results of the model-fit.
**Intensities:** The intensities of linear light profiles are not a part of the model parameterization and therefore.
**Visualization:** Linear light profiles and objects containing them (e.g.
**Basis:** We can use many linear light profiles to build a `Basis`.
**Model Fit:** Perform the model-fit using the search and analysis.
**Source MGE:** We now compose a second `Basis` of 15 Gaussians to represent the source galaxy.
**Multi Gaussian Expansion Benefits:** Fitting a galaxy's light with a superposition of Gaussians is called a Multi-Gaussian Expansion.
**Disadvantage of Basis Functions:** For many science cases, the MGE can also be a less intuitive model to interpret than a Sersic.
**Positive Only Solver:** Ensuring positive-only solutions for linear light profile intensities.
**Other Basis Functions:** In addition to the Gaussians used in this example, there is another basis function implemented in.
**Wrap Up:** Summary of the script and next steps.
- **Initial Setup:** we'll use the same strong lensing data as the previous tutorial, where.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Linear Light Profiles:** We use a variant of a light profile discussed called a "linear light profile", which is accessed.
- **Run Time:** Profiling the expected run time of the model-fit.
- **Result:** Overview of the results of the model-fit.
- **Intensities:** The intensities of linear light profiles are not a part of the model parameterization and therefore.
- **Visualization:** Linear light profiles and objects containing them (e.g.
- **Basis:** We can use many linear light profiles to build a `Basis`.
- **Model Fit:** Perform the model-fit using the search and analysis.
- **Source MGE:** We now compose a second `Basis` of 15 Gaussians to represent the source galaxy.
- **Multi Gaussian Expansion Benefits:** Fitting a galaxy's light with a superposition of Gaussians is called a Multi-Gaussian Expansion.
- **Disadvantage of Basis Functions:** For many science cases, the MGE can also be a less intuitive model to interpret than a Sersic.
- **Positive Only Solver:** Ensuring positive-only solutions for linear light profile intensities.
- **Other Basis Functions:** In addition to the Gaussians used in this example, there is another basis function implemented in.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

__Contents__

**Initial Setup:** we'll use the same strong lensing data as tutorials 1 & 2, where.
**Mask:** Define the 2D mask applied to the dataset for the model-fit.
**Run Time:** Profiling the expected run time of the model-fit.
**Search:** Configure the non-linear search used to fit the model.
**Discussion:** So, we can choose the mask we use in a model-fit.
**Positions Thresholding:** We can manually specify a set of image-plane (y,x) coordinates corresponding to the multiple images.
**Wrap Up:** Summary of the script and next steps.
- **Initial Setup:** we'll use the same strong lensing data as tutorials 1 & 2, where.
- **Mask:** Define the 2D mask applied to the dataset for the model-fit.
- **Run Time:** Profiling the expected run time of the model-fit.
- **Search:** Configure the non-linear search used to fit the model.
- **Discussion:** So, we can choose the mask we use in a model-fit.
- **Positions Thresholding:** We can manually specify a set of image-plane (y,x) coordinates corresponding to the multiple images.
- **Wrap Up:** Summary of the script and next steps.

"""

Expand Down
Loading
Loading