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
2 changes: 1 addition & 1 deletion llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate.
- [Tutorial 4: Point Sources](scripts/chapter_1_introduction/tutorial_4_point_sources.py): In the previous tutorials, we lensed extended galaxies, producing arcs and Einstein rings. We now turn to sources whose individual lensed images are too small for a telescope to resolve: **point sources**.
- Contents: Initial Setup, Seeing the Compact Source, Point Sources, Point Source Tracer, The Lens Equation, Point Solver, Finding the Images, Multiple Images and Critical Curves, Magnifications, Interpreting Fluxes, Time Delays, Connecting Time Delays to the Images, Extended Versus Point Computations, Wrap Up
- [Tutorial 5: Data](scripts/chapter_1_introduction/tutorial_5_data.py): In the last tutorials, we use tracers to create images of strong lenses. However, those images don't accurately represent what we would observe through a telescope.
- Contents: Initial Setup, Optics Blurring, Poisson Noise, Background Sky, Simulator, Output, Interferometer Data, Weak Lensing Data, Wrap Up
- Contents: Initial Setup, Optics Blurring, Poisson Noise, Background Sky, Simulator, Output, Point Source Data, Interferometer Data, Weak Lensing Data, Wrap Up
- [Tutorial 6: Fitting](scripts/chapter_1_introduction/tutorial_6_fitting.py): In previous tutorials, we used light profiles to create simulated images of a tracer and visualized how these images would appear when captured by a CCD detector on a telescope like the Hubble Space Telescope.
- Contents: Dataset, Dataset Auto-Simulation, Mask, Masked Grid, Fitting, Incorrect Fit, Model Fitting, Wrap Up
- [Tutorial 7: Summary](scripts/chapter_1_introduction/tutorial_7_summary.py): In this chapter, we have learnt that:
Expand Down
193 changes: 127 additions & 66 deletions markdown/chapter_1_introduction/tutorial_5_data.md

Large diffs are not rendered by default.

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.
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.
Binary file not shown.
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.
60 changes: 57 additions & 3 deletions notebooks/chapter_1_introduction/tutorial_5_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"- **Poisson Noise:** We'll add Poisson noise to the image, simulating the randomness in the photon-to-electron conversion process on the CCD.\n",
"- **Background Sky:** We'll add a background sky to the image, simulating the light from the sky that adds noise to the image.\n",
"- **Simulator:** We'll use the `SimulatorImaging` object to simulate imaging data that includes all these effects.\n",
"- **Other Data Types:** We'll finish with a brief look at interferometer and weak lensing data, two other types of data used to study strong lenses.\n",
"- **Other Data Types:** We'll finish with a brief look at point-source, interferometer and weak lensing datasets.\n",
"\n",
"__Contents__\n",
"\n",
Expand All @@ -40,6 +40,7 @@
"- **Background Sky:** The final effect we will consider when simulating imaging data is the background sky.\n",
"- **Simulator:** The `SimulatorImaging` object lets us create simulated imaging data while including the effects of.\n",
"- **Output:** We will now save these simulated data to `.fits` files, the standard format used by astronomers for.\n",
"- **Point Source Data:** Collect image positions, fluxes and time delays with their uncertainties.\n",
"- **Interferometer Data:** Radio / sub-mm interferometers like ALMA observe visibilities in the uv-plane rather than images.\n",
"- **Weak Lensing Data:** Weak lensing datasets are catalogues of weakly sheared background galaxy ellipticities.\n",
"- **Wrap Up:** Summary of the script and next steps."
Expand Down Expand Up @@ -636,6 +637,54 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"__Point Source Data__\n",
"\n",
"In Tutorial 4, we predicted the positions of a point source's multiple images. For real observations, we measure\n",
"these positions from the telescope image, accounting for its blurring and the foreground galaxy's light. Each\n",
"position also has an uncertainty.\n",
"\n",
"A `PointDataset` collects these measurements for lens modelling. The illustrative values below are rounded from\n",
"Tutorial 4's predictions, rather than measured from observations. We include positions in arcseconds, fluxes in\n",
"arbitrary units and time delays in days relative to the first image, with assumed uncertainties of 0.01 arcseconds,\n",
"about 10 per cent in flux and one day in delay."
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"point_dataset = al.PointDataset(\n",
" name=\"point_0\",\n",
" positions=[\n",
" (-1.039, -1.038),\n",
" (0.442, 1.608),\n",
" (1.609, 0.442),\n",
" (1.179, 1.180),\n",
" ],\n",
" positions_noise_map=0.01,\n",
" fluxes=[6.82, 55.20, 53.67, 100.71],\n",
" fluxes_noise_map=[0.68, 5.52, 5.37, 10.07],\n",
" time_delays=[0.0, -39.86, -40.03, -39.75],\n",
" time_delays_noise_map=[1.0, 1.0, 1.0, 1.0],\n",
")\n",
"\n",
"print(point_dataset.info)"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The positions use `(y, x)` coordinates, and every list follows the same image order. Negative delays mean that\n",
"an image arrives before the first image. The name `point_0` matches the point-source component introduced in\n",
"Tutorial 4, connecting these measurements to that source when fitting a model.\n",
"\n",
"Fluxes and time delays are optional: positions alone are enough to begin modelling. For more on loading and\n",
"fitting these datasets, continue to the workspace's\n",
"[point-source examples](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/point_source/start_here.py).\n",
"\n",
"__Interferometer Data__\n",
"\n",
"CCD imaging is not the only type of data used to study strong lenses. Radio and sub-mm interferometers, like the\n",
Expand Down Expand Up @@ -716,7 +765,9 @@
"\n",
"That is deliberately all we will say for now \u2014 this glimpse is foreshadowing. Weak lensing gets a full treatment in\n",
"the final tutorial of chapter 4, which describes what these shear measurements are, why they are made far from the\n",
"lens centre and how they are fitted; until then, we defer all further description to that tutorial."
"lens centre and how they are fitted; until then, we defer all further description to that tutorial. For worked\n",
"modelling examples, see the workspace\n",
"[weak-lensing examples](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/weak/start_here.py)."
]
},
{
Expand Down Expand Up @@ -764,7 +815,10 @@
"- **Simulator**: The `SimulatorImaging` object enables us to simulate realistic imaging data by including all of \n",
"these effects together and contains the `data`, `psf`, and `noise_map` components.\n",
"\n",
"- **Output**: We saved the simulated data to `.fits` files, the standard format used by astronomers for storing images."
"- **Output**: We saved the simulated data to `.fits` files, the standard format used by astronomers for storing images.\n",
"\n",
"- **Point Source Data**: A `PointDataset` collects image positions and their uncertainties, with optional fluxes\n",
"and time delays, ready for point-source modelling."
]
}
],
Expand Down
47 changes: 45 additions & 2 deletions scripts/chapter_1_introduction/tutorial_5_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- **Poisson Noise:** We'll add Poisson noise to the image, simulating the randomness in the photon-to-electron conversion process on the CCD.
- **Background Sky:** We'll add a background sky to the image, simulating the light from the sky that adds noise to the image.
- **Simulator:** We'll use the `SimulatorImaging` object to simulate imaging data that includes all these effects.
- **Other Data Types:** We'll finish with a brief look at interferometer and weak lensing data, two other types of data used to study strong lenses.
- **Other Data Types:** We'll finish with a brief look at point-source, interferometer and weak lensing datasets.

__Contents__

Expand All @@ -35,6 +35,7 @@
- **Background Sky:** The final effect we will consider when simulating imaging data is the background sky.
- **Simulator:** The `SimulatorImaging` object lets us create simulated imaging data while including the effects of.
- **Output:** We will now save these simulated data to `.fits` files, the standard format used by astronomers for.
- **Point Source Data:** Collect image positions, fluxes and time delays with their uncertainties.
- **Interferometer Data:** Radio / sub-mm interferometers like ALMA observe visibilities in the uv-plane rather than images.
- **Weak Lensing Data:** Weak lensing datasets are catalogues of weakly sheared background galaxy ellipticities.
- **Wrap Up:** Summary of the script and next steps.
Expand Down Expand Up @@ -376,6 +377,43 @@
)

"""
__Point Source Data__

In Tutorial 4, we predicted the positions of a point source's multiple images. For real observations, we measure
these positions from the telescope image, accounting for its blurring and the foreground galaxy's light. Each
position also has an uncertainty.

A `PointDataset` collects these measurements for lens modelling. The illustrative values below are rounded from
Tutorial 4's predictions, rather than measured from observations. We include positions in arcseconds, fluxes in
arbitrary units and time delays in days relative to the first image, with assumed uncertainties of 0.01 arcseconds,
about 10 per cent in flux and one day in delay.
"""
point_dataset = al.PointDataset(
name="point_0",
positions=[
(-1.039, -1.038),
(0.442, 1.608),
(1.609, 0.442),
(1.179, 1.180),
],
positions_noise_map=0.01,
fluxes=[6.82, 55.20, 53.67, 100.71],
fluxes_noise_map=[0.68, 5.52, 5.37, 10.07],
time_delays=[0.0, -39.86, -40.03, -39.75],
time_delays_noise_map=[1.0, 1.0, 1.0, 1.0],
)

print(point_dataset.info)

"""
The positions use `(y, x)` coordinates, and every list follows the same image order. Negative delays mean that
an image arrives before the first image. The name `point_0` matches the point-source component introduced in
Tutorial 4, connecting these measurements to that source when fitting a model.

Fluxes and time delays are optional: positions alone are enough to begin modelling. For more on loading and
fitting these datasets, continue to the workspace's
[point-source examples](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/point_source/start_here.py).

__Interferometer Data__

CCD imaging is not the only type of data used to study strong lenses. Radio and sub-mm interferometers, like the
Expand Down Expand Up @@ -445,7 +483,9 @@

That is deliberately all we will say for now — this glimpse is foreshadowing. Weak lensing gets a full treatment in
the final tutorial of chapter 4, which describes what these shear measurements are, why they are made far from the
lens centre and how they are fitted; until then, we defer all further description to that tutorial.
lens centre and how they are fitted; until then, we defer all further description to that tutorial. For worked
modelling examples, see the workspace
[weak-lensing examples](https://github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/weak/start_here.py).
"""
dataset_path = Path("dataset") / "weak_lensing" / "simple"

Expand Down Expand Up @@ -483,4 +523,7 @@
these effects together and contains the `data`, `psf`, and `noise_map` components.

- **Output**: We saved the simulated data to `.fits` files, the standard format used by astronomers for storing images.

- **Point Source Data**: A `PointDataset` collects image positions and their uncertainties, with optional fluxes
and time delays, ready for point-source modelling.
"""
3 changes: 3 additions & 0 deletions workspace_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,14 @@
"Background Sky",
"Simulator",
"Output",
"Point Source Data",
"Interferometer Data",
"Weak Lensing Data",
"Wrap Up"
],
"cross_refs": [
"//github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/point_source/start_here.py",
"//github.com/PyAutoLabs/autolens_workspace/blob/main/scripts/weak/start_here.py",
"scripts/simulator/interferometer.py",
"scripts/simulator/weak_lensing.py"
],
Expand Down
Loading