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
36 changes: 14 additions & 22 deletions markdown/chapter_1_introduction/tutorial_0_visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,23 @@ from autolens import jax_wrapper # Sets JAX environment before other imports
from autolens import setup_notebook; setup_notebook()
```

.../PyAutoNerves/autonerves/workspace.py:206: UserWarning: Cannot verify the workspace at HowToLens/scripts/chapter_1_introduction is compatible with the installed library version (2026.7.23.1): no `version.minimum_library_version` or `version.workspace_version` key in config/general.yaml and no version.txt at the workspace root.

If you cloned the workspace from `main` rather than a release tag, set `version.workspace_version_check: False` in config/general.yaml to silence this warning. The `main` branch updates more frequently than library releases, so version mismatches are expected and not actionable for `main`-branch users.

You can also set the environment variable PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1 to disable temporarily.
warnings.warn(_missing_version_warning(root, library_version))
.../PyAutoNerves/autonerves/workspace.py:206: UserWarning: Cannot verify the workspace at HowToLens/scripts/chapter_1_introduction is compatible with the installed library version (2026.7.23.1): no `version.minimum_library_version` or `version.workspace_version` key in config/general.yaml and no version.txt at the workspace root.

If you cloned the workspace from `main` rather than a release tag, set `version.workspace_version_check: False` in config/general.yaml to silence this warning. The `main` branch updates more frequently than library releases, so version mismatches are expected and not actionable for `main`-branch users.

You can also set the environment variable PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1 to disable temporarily.
warnings.warn(_missing_version_warning(root, library_version))
Working Directory has been set to `HowToLens`
.../PyAutoNerves/autonerves/workspace.py:206: UserWarning: Cannot verify the workspace at HowToLens/scripts/chapter_1_introduction is compatible with the installed library version (2026.7.23.1): no `version.minimum_library_version` or `version.workspace_version` key in config/general.yaml and no version.txt at the workspace root.

If you cloned the workspace from `main` rather than a release tag, set `version.workspace_version_check: False` in config/general.yaml to silence this warning. The `main` branch updates more frequently than library releases, so version mismatches are expected and not actionable for `main`-branch users.

You can also set the environment variable PYAUTO_SKIP_WORKSPACE_VERSION_CHECK=1 to disable temporarily.
warnings.warn(_missing_version_warning(root, library_version))


__Directories__

**HowToLens** assumes the working directory is the `HowToLens` repository root on your hard-disk, so that relative
paths to `dataset/` and `output/` resolve correctly.
**HowToLens** assumes the working directory is the `HowToLens` repository root on your hard-disk. This setup
allows **PyAutoLens** to:

- Load configuration settings from the config files in the `config/` folder.

- Load the example strong lens datasets in the `dataset/` folder.

- Write the results of model-fits to your hard-disk in the `output/` folder.

If you do not have a clone of **HowToLens** on your computer, you can download it here:

https://github.com/PyAutoLabs/HowToLens

If your working directory does not match this path on your computer, you can manually set it as follows (the
example below shows the path I would use on my laptop. The code is commented out so you do not use this path in
Expand Down Expand Up @@ -98,9 +90,9 @@ if al.util.dataset.should_simulate(str(dataset_path)):
)
```

Figure(700x700)
.../PyAutoArray/autoarray/operators/convolver.py:1424: UserWarning: No blurring_image provided. Only the direct image will be convolved. This may change the correctness of the PSF convolution.
.../PyAutoArray/autoarray/operators/convolver.py:1478: UserWarning: No blurring_image provided. Only the direct image will be convolved. This may change the correctness of the PSF convolution.
warnings.warn(
Figure(700x700)
Figure(1800x1800)
Figure(1800x1800)
Figure(700x700)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,18 @@
"source": [
"__Directories__\n",
"\n",
"**HowToLens** assumes the working directory is the `HowToLens` repository root on your hard-disk, so that relative\n",
"paths to `dataset/` and `output/` resolve correctly.\n",
"**HowToLens** assumes the working directory is the `HowToLens` repository root on your hard-disk. This setup\n",
"allows **PyAutoLens** to:\n",
"\n",
"- Load configuration settings from the config files in the `config/` folder.\n",
"\n",
"- Load the example strong lens datasets in the `dataset/` folder.\n",
"\n",
"- Write the results of model-fits to your hard-disk in the `output/` folder.\n",
"\n",
"If you do not have a clone of **HowToLens** on your computer, you can download it here:\n",
"\n",
" https://github.com/PyAutoLabs/HowToLens\n",
"\n",
"If your working directory does not match this path on your computer, you can manually set it as follows (the\n",
"example below shows the path I would use on my laptop. The code is commented out so you do not use this path in\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"- **Run Times:** Profiling the expected run time of the model-fit.\n",
"- **Model-Fit:** Begin the model-fit by passing the model and analysis to the search.\n",
"- **Result Info:** A concise readable summary of the results is given by printing its `info` attribute.\n",
"- **Output Folder:** Now checkout the `autolens_workspace/output` folder.\n",
"- **Output Folder:** Now checkout the `output` folder.\n",
"- **Unique Identifier:** In the output folder, you will note that results are in a folder which is a collection of random.\n",
"- **Output Folder Contents:** Now this is running you should checkout the `autolens_workspace/output` folder.\n",
"- **Output Folder Contents:** Now this is running you should checkout the `output` folder.\n",
"- **Result:** Overview of the results of the model-fit.\n",
"- **Other Practicalities:** The following are examples of other practicalities which I will document fully in this example.\n",
"- **Wrap Up:** Summary of the script and next steps.\n",
Expand Down Expand Up @@ -67,7 +67,7 @@
"\n",
"__Iterations Per Update__\n",
"\n",
"Every N iterations, the non-linear search outputs the current results to the folder `autolens_workspace/output`,\n",
"Every N iterations, the non-linear search outputs the current results to the folder `output`,\n",
"which includes producing visualization.\n",
"\n",
"Depending on how long it takes for the model to be fitted to the data (see discussion about run times below),\n",
Expand Down Expand Up @@ -448,7 +448,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the autolens_workspace/output/\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_2_practicalities\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -488,7 +488,7 @@
"source": [
"__Output Folder__\n",
"\n",
"Now checkout the `autolens_workspace/output` folder.\n",
"Now checkout the `output` folder.\n",
"\n",
"This is where the results of the search are written to hard-disk (in the `tutorial_2_practicalities` folder). \n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the autolens_workspace/output/howtolens/chapter_2/tutorial_3_realism_and_complexity\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_3_realism_and_complexity\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -361,7 +361,7 @@
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the autolens_workspace/output/3_realism_and_complexity\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_3_realism_and_complexity__local_maxima\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_custom_priors\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_custom_priors\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -706,7 +706,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_reducing_complexity\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_reducing_complexity\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -813,7 +813,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_look_harder\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_look_harder\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
"metadata": {},
"source": [
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_5_linear_light_profile\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_5_linear_light_profile\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -775,7 +775,7 @@
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_5_basis\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_5_basis\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/t7_with_positions\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_6_with_positions\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_1_extra_galaxies_noise_scaling\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_1_extra_galaxies_noise_scaling\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -650,7 +650,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_1_extra_galaxies_model\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_1_extra_galaxies_model\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_2_multi_galaxy\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_2_multi_galaxy\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_3_scaling_relation\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_3_scaling_relation\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_4_group_scale\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_4_group_scale\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -884,7 +884,7 @@
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/\"\n",
" \"tutorial_4_group_scale_scaling_relation folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
"analysis = al.AnalysisWeak(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_6_weak_lensing\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_6_weak_lensing\"\n",
" \" folder for live output of the results, images and model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
14 changes: 7 additions & 7 deletions notebooks/chapter_optional/tutorial_searches.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"analysis = al.AnalysisImaging(dataset=dataset)\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_slow\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -289,7 +289,7 @@
"metadata": {},
"source": [
"search = af.Nautilus(\n",
" path_prefix=Path(\"howtolens\") / \"chapter_2\",\n",
" path_prefix=Path(\"howtolens\") / \"chapter_optional\",\n",
" name=\"tutorial_searches_fast\",\n",
" unique_tag=dataset_name,\n",
" n_live=75,\n",
Expand All @@ -298,7 +298,7 @@
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_fast\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down Expand Up @@ -421,15 +421,15 @@
"model = af.Collection(galaxies=af.Collection(lens=lens, source=source))\n",
"\n",
"search = af.Zeus(\n",
" path_prefix=Path(\"howtolens\") / \"chapter_2\",\n",
" path_prefix=Path(\"howtolens\") / \"chapter_optional\",\n",
" name=\"tutorial_searches_zeus\",\n",
" unique_tag=dataset_name,\n",
" nwalkers=50,\n",
" nsteps=1000,\n",
")\n",
"\n",
"print(\n",
" \"Zeus has begun running - checkout the workspace/output\"\n",
" \"Zeus has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_zeus\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand All @@ -442,15 +442,15 @@
"\n",
"\n",
"search = af.Emcee(\n",
" path_prefix=Path(\"howtolens\") / \"chapter_2\",\n",
" path_prefix=Path(\"howtolens\") / \"chapter_optional\",\n",
" name=\"tutorial_searches_emcee\",\n",
" unique_tag=dataset_name,\n",
" nwalkers=50,\n",
" nsteps=1000,\n",
")\n",
"\n",
"print(\n",
" \"The non-linear search has begun running - checkout the workspace/output\"\n",
" \"The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_emcee\"\n",
" \" folder for live output of the results, images and lens model.\"\n",
" \" This Jupyter notebook cell with progress once search has completed - this could take some time!\"\n",
")\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/simulator/lens_extra_galaxy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/lens_extra_galaxy`."
"The dataset can be viewed in the folder `dataset/imaging/lens_extra_galaxy`."
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/simulator/lens_sersic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/lens_sersic`."
"The dataset can be viewed in the folder `dataset/imaging/lens_sersic`."
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/simulator/lens_x2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/x2_lens_galaxies`."
"The dataset can be viewed in the folder `dataset/imaging/x2_lens_galaxies`."
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/simulator/lens_x3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/x3_lens_galaxies`."
"The dataset can be viewed in the folder `dataset/imaging/x3_lens_galaxies`."
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/simulator/no_lens_light.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/simple__no_lens_light`."
"The dataset can be viewed in the folder `dataset/imaging/simple__no_lens_light`."
]
}
],
Expand Down
Loading
Loading