Simulating Lenses#

PyAutoLens provides tool for simulating strong lens data-sets, which can be used to test lens modeling pipelines and train neural networks to recognise and analyse images of strong lenses.

Simulator#

Simulating strong lens images uses a SimulatorImaging object, which models the process that an instrument like the Hubble Space Telescope goes through observe a strong lens. This includes accounting for the exposure time to determine the signal-to-noise of the data, blurring the observed light of the strong lens with the telescope optics and accounting for the background sky in the exposure which adds Poisson noise:

psf_2d = ag.Kernel2D.from_gaussian(
    shape_native=(11, 11), sigma=0.1, pixel_scales=grid_2d.pixel_scales
)

simulator = al.SimulatorImaging(
    exposure_time=300.0,
    background_sky_level=1.0,
    psf=psf_2d,
    add_poisson_noise=True,
)

Once we have a simulator, we can use it to create an imaging dataset which consists of an image, noise-map and Point Spread Function (PSF) by passing it a tracer and grid:

imaging = simulator.from_tracer_and_grid(tracer=tracer, grid=grid_2d)

Here is what our dataset looks like:

Alternative text Alternative text Alternative text

Examples#

The autolens_workspace includes many example simulators for simulating strong lenses with a range of different physical properties and for creating imaging datasets for a variety of telescopes (e.g. Hubble, Euclid).

Below, we show what a strong lens looks like for different instruments.

Alternative text Alternative text Alternative text Alternative text

Wrap Up#

The autolens_workspace <https://github.com/Jammy2211/autolens_workspace>`_ includes many example simulators for simulating strong lenses with a range of different physical properties, to make imaging datasets for a variety of telescopes (e.g. Hubble, Euclid) as well as interferometer datasets.