autogalaxy.SimulatorImaging#

class SimulatorImaging[source]#

Bases: SimulatorImaging

Simulations observations of imaging data, including simulation of the image, noise-map, PSF, etc. as an Imaging object.

The simulation of an Imaging dataset uses the following steps:

  1. Receive as input the raw image which is simulated via the steps below.

  2. Convolve the image with the Point Spread Function of the simulated dataset.

  3. Use input values of the background sky level in every pixel of the image to add the background sky to the PSF convolved image.

  4. Add Poisson noise to the image, which represents noise due to whether photons hits the CCD and are converted to photo-electrons which are succcessfully detected by the CCD and converted to counts.

  5. Subtract the background sky from the image, so that the returned simulated dataset is background sky subtracted.

The inputs of the SimulatorImaging object can toggle these steps on and off, for example if psf=None the PSF convolution step is omitted.

Parameters:
  • exposure_time (float) – The exposure time of the simulated imaging.

  • background_sky_level (float) – The level of the background sky of the simulated imaging.

  • psf (Optional[Kernel2D]) – An array describing the PSF kernel of the image.

  • normalize_psf (bool) – If True, the PSF kernel is normalized so all values sum to 1.0.

  • add_poisson_noise (bool) – Whether Poisson noise corresponding to photon count statistics on the imaging observation is added.

  • noise_if_add_noise_false (float) – If noise is not added to the simulated dataset a noise_map must still be returned. This value gives the value of noise assigned to every pixel in the noise-map.

  • noise_seed (int) – The random seed used to add random noise, where -1 corresponds to a random seed every run.

Methods

via_galaxies_from

Simulate an Imaging dataset from an input list of galaxies and grid.

via_image_from

Simulate an Imaging dataset from an input image.

via_plane_from

Simulate an Imaging dataset from an input plane and grid.

via_plane_from(plane, grid)[source]#

Simulate an Imaging dataset from an input plane and grid.

The planbe is used to generate the image of the galaxies which is simulated.

The steps of the SimulatorImaging simulation process (e.g. PSF convolution, noise addition) are described in the SimulatorImaging __init__ method docstring.

Parameters:
  • plane (Plane) – The plane, which contains all galaxies whose light is simulated.

  • grid (Union[ndarray, Grid2D, Grid2DIterate, Grid2DIrregular]) – The image-plane grid which the image of the strong lens is generated on.

Return type:

Imaging

via_galaxies_from(galaxies, grid)[source]#

Simulate an Imaging dataset from an input list of galaxies and grid.

The galaxies are used to create a plane, which generates the image which is simulated.

The steps of the SimulatorImaging simulation process (e.g. PSF convolution, noise addition) are described in the SimulatorImaging __init__ method docstring.

Parameters:
  • galaxies – The galaxies used to create the tracer, which describes the galaxy images used to simulate the imaging dataset.

  • grid – The image-plane grid which the image of the strong lens is generated on.