diff --git a/markdown/chapter_1_introduction/tutorial_0_visualization.md b/markdown/chapter_1_introduction/tutorial_0_visualization.md index 9d2aa3b..fe8b9cc 100644 --- a/markdown/chapter_1_introduction/tutorial_0_visualization.md +++ b/markdown/chapter_1_introduction/tutorial_0_visualization.md @@ -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 @@ -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) diff --git a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_11_0.png b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_11_0.png index b36af26..839d0ff 100644 Binary files a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_11_0.png and b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_11_0.png differ diff --git a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_13_0.png b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_13_0.png index 0e14191..61d1a71 100644 Binary files a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_13_0.png and b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_13_0.png differ diff --git a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_15_0.png b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_15_0.png index fd379f6..0708a5b 100644 Binary files a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_15_0.png and b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_15_0.png differ diff --git a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_17_0.png b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_17_0.png index c3a8430..f150e34 100644 Binary files a/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_17_0.png and b/markdown/chapter_1_introduction/tutorial_0_visualization_files/tutorial_0_visualization_17_0.png differ diff --git a/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb b/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb index a215a69..a92ded1 100644 --- a/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb +++ b/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb @@ -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", diff --git a/notebooks/chapter_2_lens_modeling/tutorial_2_practicalities.ipynb b/notebooks/chapter_2_lens_modeling/tutorial_2_practicalities.ipynb index 30567b3..56e3e87 100644 --- a/notebooks/chapter_2_lens_modeling/tutorial_2_practicalities.ipynb +++ b/notebooks/chapter_2_lens_modeling/tutorial_2_practicalities.ipynb @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/notebooks/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.ipynb b/notebooks/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.ipynb index 70d24c2..758c649 100644 --- a/notebooks/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.ipynb +++ b/notebooks/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.ipynb @@ -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", @@ -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", ")" diff --git a/notebooks/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.ipynb b/notebooks/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.ipynb index 4e82a8f..74be75a 100644 --- a/notebooks/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.ipynb +++ b/notebooks/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.ipynb @@ -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", @@ -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", @@ -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", diff --git a/notebooks/chapter_2_lens_modeling/tutorial_5_linear_profiles.ipynb b/notebooks/chapter_2_lens_modeling/tutorial_5_linear_profiles.ipynb index ff865a7..a1a2299 100644 --- a/notebooks/chapter_2_lens_modeling/tutorial_5_linear_profiles.ipynb +++ b/notebooks/chapter_2_lens_modeling/tutorial_5_linear_profiles.ipynb @@ -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", @@ -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", diff --git a/notebooks/chapter_2_lens_modeling/tutorial_6_masking_and_positions.ipynb b/notebooks/chapter_2_lens_modeling/tutorial_6_masking_and_positions.ipynb index dd7d721..de71390 100644 --- a/notebooks/chapter_2_lens_modeling/tutorial_6_masking_and_positions.ipynb +++ b/notebooks/chapter_2_lens_modeling/tutorial_6_masking_and_positions.ipynb @@ -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", diff --git a/notebooks/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.ipynb b/notebooks/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.ipynb index 7e76259..fc8e58c 100644 --- a/notebooks/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.ipynb +++ b/notebooks/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.ipynb @@ -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", @@ -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", diff --git a/notebooks/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.ipynb b/notebooks/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.ipynb index ad94b06..22418ce 100644 --- a/notebooks/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.ipynb +++ b/notebooks/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.ipynb @@ -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", diff --git a/notebooks/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.ipynb b/notebooks/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.ipynb index 0a00a28..1bab78a 100644 --- a/notebooks/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.ipynb +++ b/notebooks/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.ipynb @@ -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", diff --git a/notebooks/chapter_4_scaling_up_lensing/tutorial_4_group_scale.ipynb b/notebooks/chapter_4_scaling_up_lensing/tutorial_4_group_scale.ipynb index 40c905a..0c6fa67 100644 --- a/notebooks/chapter_4_scaling_up_lensing/tutorial_4_group_scale.ipynb +++ b/notebooks/chapter_4_scaling_up_lensing/tutorial_4_group_scale.ipynb @@ -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", @@ -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", diff --git a/notebooks/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.ipynb b/notebooks/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.ipynb index b46a2a7..44fdc4c 100644 --- a/notebooks/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.ipynb +++ b/notebooks/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.ipynb @@ -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", diff --git a/notebooks/chapter_optional/tutorial_searches.ipynb b/notebooks/chapter_optional/tutorial_searches.ipynb index 5f258a3..cdb0cb2 100644 --- a/notebooks/chapter_optional/tutorial_searches.ipynb +++ b/notebooks/chapter_optional/tutorial_searches.ipynb @@ -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", @@ -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", @@ -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", @@ -421,7 +421,7 @@ "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", @@ -429,7 +429,7 @@ ")\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", @@ -442,7 +442,7 @@ "\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", @@ -450,7 +450,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_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", diff --git a/notebooks/simulator/lens_extra_galaxy.ipynb b/notebooks/simulator/lens_extra_galaxy.ipynb index f03457b..6c50d85 100644 --- a/notebooks/simulator/lens_extra_galaxy.ipynb +++ b/notebooks/simulator/lens_extra_galaxy.ipynb @@ -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`." ] } ], diff --git a/notebooks/simulator/lens_sersic.ipynb b/notebooks/simulator/lens_sersic.ipynb index 95295e1..d09be35 100644 --- a/notebooks/simulator/lens_sersic.ipynb +++ b/notebooks/simulator/lens_sersic.ipynb @@ -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`." ] } ], diff --git a/notebooks/simulator/lens_x2.ipynb b/notebooks/simulator/lens_x2.ipynb index 51ef62a..a0d6f33 100644 --- a/notebooks/simulator/lens_x2.ipynb +++ b/notebooks/simulator/lens_x2.ipynb @@ -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`." ] } ], diff --git a/notebooks/simulator/lens_x3.ipynb b/notebooks/simulator/lens_x3.ipynb index b5d4b33..c3b6606 100644 --- a/notebooks/simulator/lens_x3.ipynb +++ b/notebooks/simulator/lens_x3.ipynb @@ -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`." ] } ], diff --git a/notebooks/simulator/no_lens_light.ipynb b/notebooks/simulator/no_lens_light.ipynb index 30de813..ea1901d 100644 --- a/notebooks/simulator/no_lens_light.ipynb +++ b/notebooks/simulator/no_lens_light.ipynb @@ -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`." ] } ], diff --git a/notebooks/simulator/no_lens_light__mass_sis.ipynb b/notebooks/simulator/no_lens_light__mass_sis.ipynb index ea30376..3178f64 100644 --- a/notebooks/simulator/no_lens_light__mass_sis.ipynb +++ b/notebooks/simulator/no_lens_light__mass_sis.ipynb @@ -350,7 +350,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__mass_sis`." ] } ], diff --git a/notebooks/simulator/source_complex.ipynb b/notebooks/simulator/source_complex.ipynb index 43d5984..937592e 100644 --- a/notebooks/simulator/source_complex.ipynb +++ b/notebooks/simulator/source_complex.ipynb @@ -381,7 +381,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/source_complex`." + "The dataset can be viewed in the folder `dataset/imaging/source_complex`." ] } ], diff --git a/scripts/chapter_1_introduction/tutorial_0_visualization.py b/scripts/chapter_1_introduction/tutorial_0_visualization.py index e9b8ed1..0dcf202 100644 --- a/scripts/chapter_1_introduction/tutorial_0_visualization.py +++ b/scripts/chapter_1_introduction/tutorial_0_visualization.py @@ -24,8 +24,18 @@ """ __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 diff --git a/scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py b/scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py index 14af3e0..78b18d0 100755 --- a/scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py +++ b/scripts/chapter_2_lens_modeling/tutorial_2_practicalities.py @@ -30,9 +30,9 @@ - **Run Times:** Profiling the expected run time of the model-fit. - **Model-Fit:** Begin the model-fit by passing the model and analysis to the search. - **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. +- **Output Folder:** Now checkout the `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. +- **Output Folder Contents:** Now this is running you should checkout the `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. @@ -62,7 +62,7 @@ __Iterations Per Update__ -Every N iterations, the non-linear search outputs the current results to the folder `autolens_workspace/output`, +Every N iterations, the non-linear search outputs the current results to the folder `output`, which includes producing visualization. Depending on how long it takes for the model to be fitted to the data (see discussion about run times below), @@ -290,7 +290,7 @@ For tasks like loading results, inspecting data, plotting, and interpreting results, Jupyter notebooks remain ideal. """ print( - "The non-linear search has begun running - checkout the autolens_workspace/output/" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_2_practicalities" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -313,7 +313,7 @@ """ __Output Folder__ -Now checkout the `autolens_workspace/output` folder. +Now checkout the `output` folder. This is where the results of the search are written to hard-disk (in the `tutorial_2_practicalities` folder). diff --git a/scripts/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.py b/scripts/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.py index 7cb3258..50a4e2f 100644 --- a/scripts/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.py +++ b/scripts/chapter_2_lens_modeling/tutorial_3_realism_and_complexity.py @@ -150,7 +150,7 @@ Run the non-linear search. """ print( - "The non-linear search has begun running - checkout the autolens_workspace/output/howtolens/chapter_2/tutorial_3_realism_and_complexity" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_3_realism_and_complexity" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -204,7 +204,7 @@ ) print( - "The non-linear search has begun running - checkout the autolens_workspace/output/3_realism_and_complexity" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_3_realism_and_complexity__local_maxima" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py b/scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py index ed9282f..ef2d726 100644 --- a/scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py +++ b/scripts/chapter_2_lens_modeling/tutorial_4_dealing_with_failure.py @@ -265,7 +265,7 @@ Run the non-linear search. """ print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_custom_priors" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_custom_priors" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -384,7 +384,7 @@ Run the non-linear search. """ print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_reducing_complexity" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_reducing_complexity" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -468,7 +468,7 @@ Run the non-linear search. """ print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_4_look_harder" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_4_look_harder" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py b/scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py index da1b8de..05c4eda 100644 --- a/scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py +++ b/scripts/chapter_2_lens_modeling/tutorial_5_linear_profiles.py @@ -203,7 +203,7 @@ Run the non-linear search. """ print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_5_linear_light_profile" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_5_linear_light_profile" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -476,7 +476,7 @@ ) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_2/tutorial_5_basis" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_5_basis" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_2_lens_modeling/tutorial_6_masking_and_positions.py b/scripts/chapter_2_lens_modeling/tutorial_6_masking_and_positions.py index b4dbaeb..534c098 100644 --- a/scripts/chapter_2_lens_modeling/tutorial_6_masking_and_positions.py +++ b/scripts/chapter_2_lens_modeling/tutorial_6_masking_and_positions.py @@ -261,7 +261,7 @@ ) print( - "The non-linear search has begun running - checkout the workspace/output/t7_with_positions" + "The non-linear search has begun running - checkout the output/howtolens/chapter_2/tutorial_6_with_positions" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py b/scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py index d11df6e..b16abcb 100644 --- a/scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py +++ b/scripts/chapter_4_scaling_up_lensing/tutorial_1_extra_galaxies.py @@ -243,7 +243,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_1_extra_galaxies_noise_scaling" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_1_extra_galaxies_noise_scaling" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -426,7 +426,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_1_extra_galaxies_model" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_1_extra_galaxies_model" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.py b/scripts/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.py index d94acea..c38016d 100644 --- a/scripts/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.py +++ b/scripts/chapter_4_scaling_up_lensing/tutorial_2_multi_galaxy.py @@ -321,7 +321,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_2_multi_galaxy" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_2_multi_galaxy" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.py b/scripts/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.py index 435c8a8..10bcbf5 100644 --- a/scripts/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.py +++ b/scripts/chapter_4_scaling_up_lensing/tutorial_3_scaling_relation.py @@ -521,7 +521,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_3_scaling_relation" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_3_scaling_relation" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_4_scaling_up_lensing/tutorial_4_group_scale.py b/scripts/chapter_4_scaling_up_lensing/tutorial_4_group_scale.py index fa94eb4..30161ab 100644 --- a/scripts/chapter_4_scaling_up_lensing/tutorial_4_group_scale.py +++ b/scripts/chapter_4_scaling_up_lensing/tutorial_4_group_scale.py @@ -470,7 +470,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_4_group_scale" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_4_group_scale" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -605,7 +605,7 @@ ) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/" "tutorial_4_group_scale_scaling_relation folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.py b/scripts/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.py index 2841a02..e952906 100644 --- a/scripts/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.py +++ b/scripts/chapter_4_scaling_up_lensing/tutorial_6_weak_lensing.py @@ -367,7 +367,7 @@ analysis = al.AnalysisWeak(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output/howtolens/chapter_4/tutorial_6_weak_lensing" + "The non-linear search has begun running - checkout the output/howtolens/chapter_4/tutorial_6_weak_lensing" " folder for live output of the results, images and model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/chapter_optional/tutorial_searches.py b/scripts/chapter_optional/tutorial_searches.py index 4bb465d..dfec8d5 100644 --- a/scripts/chapter_optional/tutorial_searches.py +++ b/scripts/chapter_optional/tutorial_searches.py @@ -143,7 +143,7 @@ analysis = al.AnalysisImaging(dataset=dataset) print( - "The non-linear search has begun running - checkout the workspace/output" + "The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_slow" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -165,7 +165,7 @@ Now lets run the search with fast settings, so we can compare the total number of iterations required. """ search = af.Nautilus( - path_prefix=Path("howtolens") / "chapter_2", + path_prefix=Path("howtolens") / "chapter_optional", name="tutorial_searches_fast", unique_tag=dataset_name, n_live=75, @@ -174,7 +174,7 @@ ) print( - "The non-linear search has begun running - checkout the workspace/output" + "The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_fast" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -264,7 +264,7 @@ model = af.Collection(galaxies=af.Collection(lens=lens, source=source)) search = af.Zeus( - path_prefix=Path("howtolens") / "chapter_2", + path_prefix=Path("howtolens") / "chapter_optional", name="tutorial_searches_zeus", unique_tag=dataset_name, nwalkers=50, @@ -272,7 +272,7 @@ ) print( - "Zeus has begun running - checkout the workspace/output" + "Zeus has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_zeus" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) @@ -285,7 +285,7 @@ search = af.Emcee( - path_prefix=Path("howtolens") / "chapter_2", + path_prefix=Path("howtolens") / "chapter_optional", name="tutorial_searches_emcee", unique_tag=dataset_name, nwalkers=50, @@ -293,7 +293,7 @@ ) print( - "The non-linear search has begun running - checkout the workspace/output" + "The non-linear search has begun running - checkout the output/howtolens/chapter_optional/tutorial_searches_emcee" " folder for live output of the results, images and lens model." " This Jupyter notebook cell with progress once search has completed - this could take some time!" ) diff --git a/scripts/simulator/lens_extra_galaxy.py b/scripts/simulator/lens_extra_galaxy.py index 2d7d20a..5a8e4bf 100644 --- a/scripts/simulator/lens_extra_galaxy.py +++ b/scripts/simulator/lens_extra_galaxy.py @@ -266,5 +266,5 @@ ) """ -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`. """ diff --git a/scripts/simulator/lens_sersic.py b/scripts/simulator/lens_sersic.py index 1c7ca24..cf6f7f8 100644 --- a/scripts/simulator/lens_sersic.py +++ b/scripts/simulator/lens_sersic.py @@ -182,5 +182,5 @@ ) """ -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`. """ diff --git a/scripts/simulator/lens_x2.py b/scripts/simulator/lens_x2.py index 8eeb19a..2bb19f9 100644 --- a/scripts/simulator/lens_x2.py +++ b/scripts/simulator/lens_x2.py @@ -190,5 +190,5 @@ ) """ -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`. """ diff --git a/scripts/simulator/lens_x3.py b/scripts/simulator/lens_x3.py index b3df746..5e4a9ce 100644 --- a/scripts/simulator/lens_x3.py +++ b/scripts/simulator/lens_x3.py @@ -217,5 +217,5 @@ ) """ -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`. """ diff --git a/scripts/simulator/no_lens_light.py b/scripts/simulator/no_lens_light.py index 8f56a1a..eaf1453 100644 --- a/scripts/simulator/no_lens_light.py +++ b/scripts/simulator/no_lens_light.py @@ -228,5 +228,5 @@ ) """ -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`. """ diff --git a/scripts/simulator/no_lens_light__mass_sis.py b/scripts/simulator/no_lens_light__mass_sis.py index 6e3bc0b..9403194 100644 --- a/scripts/simulator/no_lens_light__mass_sis.py +++ b/scripts/simulator/no_lens_light__mass_sis.py @@ -164,5 +164,5 @@ ) """ -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__mass_sis`. """ diff --git a/scripts/simulator/source_complex.py b/scripts/simulator/source_complex.py index e2a4b27..3628980 100644 --- a/scripts/simulator/source_complex.py +++ b/scripts/simulator/source_complex.py @@ -194,5 +194,5 @@ ) """ -The dataset can be viewed in the folder `autolens_workspace/dataset/imaging/source_complex`. +The dataset can be viewed in the folder `dataset/imaging/source_complex`. """