Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Mar 9, 2024
1 parent e5ef3cd commit 805b21f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion autolens/config/visualize/plots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
residual_map: false
normalized_residual_map: false
galaxies: # Settings for plots of galaxies (e.g. GalaxiesPlotter).
subplot_galaxies: true # Plot subplot of all quantities in each plane (e.g. images, convergence)?
subplot_galaxies: true # Plot subplot of all quantities in each galaxies group (e.g. images, convergence)?
all_at_end_png: true # Plot all individual plots listed below as .png (even if False)?
all_at_end_fits: true # Plot all individual plots listed below as .fits (even if False)?
all_at_end_pdf: false # Plot all individual plots listed below as publication-quality .pdf (even if False)?
Expand Down
12 changes: 6 additions & 6 deletions docs/api/galaxy.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=======================
Galaxy / Plane / Tracer
=======================
===============
Galaxy / Tracer
===============

Galaxy / Plane / Tracer
-----------------------
Galaxy / Tracer
---------------

.. currentmodule:: autolens

Expand All @@ -13,7 +13,7 @@ Galaxy / Plane / Tracer
:recursive:

Galaxy
Plane
Galaxies
Tracer

To treat the redshift of a galaxy as a free parameter in a model, the ``Redshift`` object must
Expand Down
15 changes: 3 additions & 12 deletions docs/howtolens/chapter_1_introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,11 @@ The chapter contains the following tutorials:
`Tutorial 3: galaxies <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_3_galaxies.ipynb>`_
- Making galaxy objects out of light and mass profile.

`Tutorial 4: Planes <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_4_planes.ipynb>`_
- Grouping galaxies at a common redshift to form an image-plane and source-plane.

`Tutorial 5: Ray Tracing <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_5_tracer.ipynb>`_
`Tutorial 4: Ray Tracing <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_5_ray_tracing.ipynb>`_
- Using Grids and galaxies to perform strong lens ray-tracing!

`Tutorial 6: More Ray Tracing <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_6_more_tracer.ipynb>`_
`Tutorial 5: More Ray Tracing <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_5_more_ray_tracing.ipynb>`_
- Advanced strong lens ray-tracing.

`Tutorial 7: Data <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_7_data.ipynb>`_
- Loading and inspecting telescope imaging data of a strong lens.

`Tutorial 8: Fitting <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_8_fitting.ipynb>`_
- Fitting data with a strong lens model.

`Tutorial 9: Summary <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_9_summary.ipynb>`_
`Tutorial 8: Summary <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_1_introduction/tutorial_8_summary.ipynb>`_
- A summary of the chapter.
22 changes: 14 additions & 8 deletions docs/howtolens/chapter_2_lens_modeling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,32 @@ In chapter 2, we'll take you through how to model strong lenses using a non-line

The chapter contains the following tutorials:

`Tutorial 1: Lens Modeling <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_1_non_linear_search.ipynb>`_
`Tutorial 1: Data <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_1_data.ipynb>`_
- Loading and inspecting telescope imaging data of a strong lens.

`Tutorial 2: Fitting <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_2_fitting.ipynb>`_
- Fitting data with a strong lens model.

`Tutorial 3: Non-linear Search <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_3_non_linear_search.ipynb>`_
- How a non-linear search is used to fit a lens model.

`Tutorial 2: Parameter Space And Priors <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_2_parameter_space_and_priors.ipynb>`_
`Tutorial 4: Parameter Space And Priors <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_4_parameter_space_and_priors.ipynb>`_
- The Concepts of a parameter space and priors.

`Tutorial 3: Realism and Complexity <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.ipynb>`_
`Tutorial 5: Realism and Complexity <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_5_realism_and_complexity.ipynb>`_
- Finding a balance between realism and complexity when composing and fitting a lens model.

`Tutorial 4: Dealing with Failure <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.ipynb>`_
`Tutorial 6: Dealing with Failure <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_6_dealing_with_failure.ipynb>`_
- What to do when PyAutoLens finds an inaccurate lens model.

`Tutorial 5: Linear Profiles <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_5_linear_profiles.ipynb>`_
`Tutorial 7: Linear Profiles <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_7_linear_profiles.ipynb>`_
- Light profiles which capture complex morphologies in a reduced number of non-linear parameters.

`Tutorial 6: Masking and Positions <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_6_masking_and_positions.ipynb>`_
`Tutorial 8: Masking and Positions <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_8_masking_and_positions.ipynb>`_
- How to mask and mark positions on your data to improve the lens model.

`Tutorial 7: Results <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_7_results.ipynb>`_
`Tutorial 9: Results <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_9_results.ipynb>`_
- Overview of the results available after successfully fitting a lens model.

`Tutorial 8: Need for Speed <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_8_need_for_speed.ipynb>`_
`Tutorial 10: Need for Speed <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=notebooks/howtolens/chapter_2_lens_modeling/tutorial_10_need_for_speed.ipynb>`_
- How to fit complex models whilst balancing efficiency and run-time.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ How does PyAutoLens Work?

A strong lens system can be quickly assembled from abstracted objects. A ``Galaxy`` object contains one or
more ``LightProfile``'s and ``MassProfile``'s, which represent its two dimensional distribution of starlight and mass.
``Galaxy``’s lie at a particular distance (redshift) from the observer, and are grouped into ``Plane``'s. Raytracing
through multiple ``Plane``'s is achieved by passing them to a ``Tracer`` with an ``astropy`` Cosmology. By passing
``Galaxy``’s lie at a particular distance (redshift) from the observer, and are grouped into planes. Ray tracing
through multiple planess is achieved by passing them to a ``Tracer`` with an ``astropy`` Cosmology. By passing
these objects a ``Grid2D`` strong lens sightlines are computed, including multi-plane ray-tracing. All of these
objects are extensible, making it straightforward to compose highly customized lensing system. The example code
below shows this in action:
Expand Down
8 changes: 4 additions & 4 deletions test_autolens/lens/test_operate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def test__operate_image__blurred_images_2d_via_psf_from__for_tracer_gives_list_o
grid=sub_grid_2d_7x7, psf=psf_3x3, blurring_grid=blurring_grid_2d_7x7
)

source_grid_2d_7x7 = g0.traced_grid_from(grid=sub_grid_2d_7x7)
source_blurring_grid_2d_7x7 = g0.traced_grid_from(grid=blurring_grid_2d_7x7)
source_grid_2d_7x7 = g0.traced_grid_2d_from(grid=sub_grid_2d_7x7)
source_blurring_grid_2d_7x7 = g0.traced_grid_2d_from(grid=blurring_grid_2d_7x7)

blurred_image_1 = g1.blurred_image_2d_from(
grid=source_grid_2d_7x7, psf=psf_3x3, blurring_grid=source_blurring_grid_2d_7x7
Expand Down Expand Up @@ -65,8 +65,8 @@ def test__operate_image__blurred_images_2d_via_convolver_from__for_tracer_gives_
blurring_grid=blurring_grid_2d_7x7,
)

source_grid_2d_7x7 = g0.traced_grid_from(grid=sub_grid_2d_7x7)
source_blurring_grid_2d_7x7 = g0.traced_grid_from(grid=blurring_grid_2d_7x7)
source_grid_2d_7x7 = g0.traced_grid_2d_from(grid=sub_grid_2d_7x7)
source_blurring_grid_2d_7x7 = g0.traced_grid_2d_from(grid=blurring_grid_2d_7x7)

blurred_image_1 = g1.blurred_image_2d_from(
grid=source_grid_2d_7x7,
Expand Down

0 comments on commit 805b21f

Please sign in to comment.