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
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 28 additions & 4 deletions start_here.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,41 @@
"\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",
"to being able to model real strong lens data with **PyAutoLens** for scientific research.\n",
"\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_<N>_<name>/tutorial_<M>_<topic>.py` (Python script)\n",
"or the matching `.ipynb` in `notebooks/`. Tutorials build on each other within a chapter and assume you have\n",
Expand All @@ -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",
Expand Down
32 changes: 28 additions & 4 deletions start_here.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,41 @@

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
to being able to model real strong lens data with **PyAutoLens** for scientific research.

- 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_<N>_<name>/tutorial_<M>_<topic>.py` (Python script)
or the matching `.ipynb` in `notebooks/`. Tutorials build on each other within a chapter and assume you have
Expand All @@ -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__
Expand Down
Loading