From 01bf464a17ea368a21328af794da473040c6cb5b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Nov 2026 16:48:25 +0000 Subject: [PATCH] start_here and README: HowToLens and natural language start_here.py gains a 'HowToLens and Natural Language' section: natural language does not remove the need for expertise, HowToLens teaches strong lensing from first principles so you can direct an analysis in natural language or Python, plus a self-bootstrapping teacher-mode prompt for the autolens_assistant. The README study prompt is made self-bootstrapping too (the agent clones the assistant). Also corrects the chapter list, which named chapter 3 'search chaining' and chapter 4 'pixelizations'. start_here.ipynb's intro cell is patched to match, Colab cells untouched. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016nhQ8QgLw3SZjRMSaX3v5z --- README.md | 14 ++++++++------ start_here.ipynb | 32 ++++++++++++++++++++++++++++---- start_here.py | 32 ++++++++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index fb86fa0..79b98e3 100644 --- a/README.md +++ b/README.md @@ -49,15 +49,17 @@ We recommend completing chapters 1 and 2, then applying what you've learned to r Use the [Jupyter notebooks](notebooks/) to run the code (recommended), or read the available [Markdown lectures](markdown/README.md) directly on GitHub. -For help alongside the lectures, open the [autolens_assistant](https://github.com/PyAutoLabs/autolens_assistant) -repository in your AI coding agent, following its setup instructions, and paste: +For help alongside the lectures, study with the [PyAutoLens AI Assistant](https://github.com/PyAutoLabs/autolens_assistant) +in teacher mode. Open Claude Code, Codex or another AI coding agent and paste the prompt below. The agent downloads +the assistant and installs **PyAutoLens** for you: ```text -Enter teacher mode. +I want to work through the HowToLens lectures (https://github.com/PyAutoLabs/HowToLens) with the +PyAutoLens Assistant: https://github.com/PyAutoLabs/autolens_assistant +First clone that repository, cd into it and follow its AGENTS.md. -I want to work through the HowToLens lectures. Show me where to find them -and how to use Jupyter Notebook or Markdown, then help me with questions -as I go. +Enter teacher mode. Show me where to find the lectures and how to use Jupyter Notebook or +Markdown, then help me with questions as I go. ``` The assistant can answer questions about concepts, equations, code and results as you study, and help with diff --git a/start_here.ipynb b/start_here.ipynb index c34a4d6..00480c9 100644 --- a/start_here.ipynb +++ b/start_here.ipynb @@ -11,6 +11,28 @@ "\n", "This script gives you a one-page overview of the series and points you to the first tutorial.\n", "\n", + "__HowToLens and Natural Language__\n", + "\n", + "**PyAutoLens** can be used by describing an analysis in natural language to an AI coding agent, which writes and runs\n", + "the **PyAutoLens** code for you. Natural language does not remove the need for expertise: to direct an analysis well,\n", + "and to recognise when a result is wrong, you still need to understand the science, the modeling assumptions and\n", + "how uncertainty is quantified.\n", + "\n", + "That is what **HowToLens** is for. It teaches strong lensing from first principles, with real **PyAutoLens** Python that you\n", + "run and explore yourself, so that you can then describe a lens model in natural language with expertise, or write it\n", + "in Python directly. Python is not going anywhere: every lecture is ordinary **PyAutoLens** code.\n", + "\n", + "You can also study with the [PyAutoLens AI Assistant](https://github.com/PyAutoLabs/autolens_assistant) in teacher\n", + "mode, which explains concepts, equations, code and results as you go. Open Claude Code, Codex or another AI coding\n", + "agent and paste:\n", + "\n", + "> I want to work through the HowToLens lectures (https://github.com/PyAutoLabs/HowToLens) with the\n", + "> PyAutoLens Assistant: https://github.com/PyAutoLabs/autolens_assistant\n", + "> First clone that repository, cd into it and follow its AGENTS.md.\n", + ">\n", + "> Enter teacher mode. Show me where to find the lectures and how to use Jupyter Notebook or\n", + "> Markdown, then help me with questions as I go.\n", + "\n", "__HowToLens__\n", "\n", "**HowToLens** is a four-chapter guide which takes you, step by step, from knowing nothing about strong lensing\n", @@ -18,10 +40,12 @@ "\n", "- Chapter 1: Introduction to strong lensing \u2014 grids, light profiles, mass profiles, galaxies, ray-tracing,\n", " simulated data, and how fitting works.\n", - "- Chapter 2: Bayesian inference and non-linear searches \u2014 how to fit a lens model to CCD imaging data.\n", - "- Chapter 3: Search chaining \u2014 automated pipelines that fit complex systems by chaining multiple searches.\n", - "- Chapter 4: Pixelized source reconstruction \u2014 reconstructing sources with irregular morphology using\n", + "- Chapter 2: Bayesian inference and non-linear searches \u2014 how to fit a lens model to CCD imaging data, ending\n", + " with search chaining and automated pipelines.\n", + "- Chapter 3: Pixelized source reconstruction \u2014 reconstructing sources with irregular morphology using\n", " inversions and regularization.\n", + "- Chapter 4: Scaling up lensing \u2014 extra galaxies, multi-galaxy lenses, scaling relations, group and cluster\n", + " scales, and weak lensing.\n", "\n", "Each chapter is organised into numbered tutorial files: `chapter__/tutorial__.py` (Python script)\n", "or the matching `.ipynb` in `notebooks/`. Tutorials build on each other within a chapter and assume you have\n", @@ -37,7 +61,7 @@ "3. Work through `chapter_2_lens_modeling`.\n", "4. At this point you can start modeling real lenses using scripts in the separate\n", " `autolens_workspace` repository \u2014 you know enough to be productive.\n", - "5. Come back for `chapter_3_search_chaining` and `chapter_4_pixelizations` when you want to tackle more\n", + "5. Come back for `chapter_3_pixelizations` and `chapter_4_scaling_up_lensing` when you want to tackle more\n", " complex systems.\n", "\n", "__Notebooks vs Scripts__\n", diff --git a/start_here.py b/start_here.py index bc718ff..31832d4 100644 --- a/start_here.py +++ b/start_here.py @@ -6,6 +6,28 @@ This script gives you a one-page overview of the series and points you to the first tutorial. +__HowToLens and Natural Language__ + +**PyAutoLens** can be used by describing an analysis in natural language to an AI coding agent, which writes and runs +the **PyAutoLens** code for you. Natural language does not remove the need for expertise: to direct an analysis well, +and to recognise when a result is wrong, you still need to understand the science, the modeling assumptions and +how uncertainty is quantified. + +That is what **HowToLens** is for. It teaches strong lensing from first principles, with real **PyAutoLens** Python that you +run and explore yourself, so that you can then describe a lens model in natural language with expertise, or write it +in Python directly. Python is not going anywhere: every lecture is ordinary **PyAutoLens** code. + +You can also study with the [PyAutoLens AI Assistant](https://github.com/PyAutoLabs/autolens_assistant) in teacher +mode, which explains concepts, equations, code and results as you go. Open Claude Code, Codex or another AI coding +agent and paste: + +> I want to work through the HowToLens lectures (https://github.com/PyAutoLabs/HowToLens) with the +> PyAutoLens Assistant: https://github.com/PyAutoLabs/autolens_assistant +> First clone that repository, cd into it and follow its AGENTS.md. +> +> Enter teacher mode. Show me where to find the lectures and how to use Jupyter Notebook or +> Markdown, then help me with questions as I go. + __HowToLens__ **HowToLens** is a four-chapter guide which takes you, step by step, from knowing nothing about strong lensing @@ -13,10 +35,12 @@ - Chapter 1: Introduction to strong lensing — grids, light profiles, mass profiles, galaxies, ray-tracing, simulated data, and how fitting works. -- Chapter 2: Bayesian inference and non-linear searches — how to fit a lens model to CCD imaging data. -- Chapter 3: Search chaining — automated pipelines that fit complex systems by chaining multiple searches. -- Chapter 4: Pixelized source reconstruction — reconstructing sources with irregular morphology using +- Chapter 2: Bayesian inference and non-linear searches — how to fit a lens model to CCD imaging data, ending + with search chaining and automated pipelines. +- Chapter 3: Pixelized source reconstruction — reconstructing sources with irregular morphology using inversions and regularization. +- Chapter 4: Scaling up lensing — extra galaxies, multi-galaxy lenses, scaling relations, group and cluster + scales, and weak lensing. Each chapter is organised into numbered tutorial files: `chapter__/tutorial__.py` (Python script) or the matching `.ipynb` in `notebooks/`. Tutorials build on each other within a chapter and assume you have @@ -32,7 +56,7 @@ 3. Work through `chapter_2_lens_modeling`. 4. At this point you can start modeling real lenses using scripts in the separate `autolens_workspace` repository — you know enough to be productive. -5. Come back for `chapter_3_search_chaining` and `chapter_4_pixelizations` when you want to tackle more +5. Come back for `chapter_3_pixelizations` and `chapter_4_scaling_up_lensing` when you want to tackle more complex systems. __Notebooks vs Scripts__