autolens.Tracer#

class autolens.Tracer(planes, cosmology, profiling_dict: Optional[Dict] = None)[source]#
__init__(planes, cosmology, profiling_dict: Optional[Dict] = None)[source]#

Ray-tracer for a lens system with any number of planes.

The redshift of these planes are specified by the redshits of the galaxies; there is a unique plane redshift for every unique galaxy redshift (galaxies with identical redshifts are put in the same plane).

To perform multi-plane ray-tracing, a cosmology must be supplied so that deflection-angles can be rescaled according to the lens-geometry of the multi-plane system. All galaxies input to the tracer must therefore have redshifts.

This tracer has only one grid (see gridStack) which is used for ray-tracing.

Parameters
  • galaxies ([Galaxy]) – The list of galaxies in the ray-tracing calculation.

  • image_plane_grid (grid_stacks.GridStack) – The image-plane grid which is traced. (includes the grid, sub-grid, blurring-grid, etc.).

  • border (masks.GridBorder) – The border of the grid, which is used to relocate demagnified traced pixels to the source-plane borders.

  • cosmology (astropy.cosmology) – The cosmology of the ray-tracing calculation.

Methods

__init__(planes, cosmology[, profiling_dict])

Ray-tracer for a lens system with any number of planes.

area_within_tangential_critical_curve_from(grid)

Returns the surface area within the tangential critical curve, the calculation of whihc is described in the function tangential_critical_curve_from()

blurred_image_2d_list_via_convolver_from(…)

Evaluate the light object’s list of 2D images from a input 2D grid of coordinates and convolve each image with a PSF, using a autoarray.operators.convolver.Convolver object.

blurred_image_2d_list_via_psf_from(grid, …)

Evaluate the light object’s list of 2D images from a input 2D grid of coordinates and convolve each image with a PSF.

blurred_image_2d_via_convolver_from(grid, …)

Evaluate the light object’s 2D image from a input 2D grid of coordinates and convolve it with a PSF, using a autoarray.operators.convolver.Convolver object.

blurred_image_2d_via_psf_from(grid, psf, …)

Evaluate the light object’s 2D image from a input 2D grid of coordinates and convolve it with a PSF.

caustics_from(grid[, pixel_scale])

Returns the both the tangential and radial caustics of lensing object as a two entry list of irregular 2D grids.

convergence_2d_from(grid)

convergence_2d_via_hessian_from(grid[, buffer])

Returns the convergence of the lensing object, which is computed from the 2D deflection angle map via the Hessian using the expression (see equation 56 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

convergence_2d_via_jacobian_from(grid[, …])

Returns the convergence of the lensing object, which is computed from the 2D deflection angle map via the Jacobian using the expression (see equation 58 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

convolve_via_convolver(image, …)

critical_curves_from(grid[, pixel_scale])

Returns the both the tangential and radial critical curves of lensing object as a two entry list of irregular 2D grids.

deflections_between_planes_from(grid[, …])

deflections_of_planes_summed_from(grid)

deflections_yx_2d_from(grid)

dict()

A dictionary representation of the instance comprising a type field which contains the entire class path by which the type can be imported and constructor arguments.

einstein_mass_angular_from(grid[, pixel_scale])

Returns the angular Einstein Mass, which is defined as:

einstein_radius_from(grid[, pixel_scale])

Returns the Einstein radius, which is defined as the radius of the circle which contains the same area as the area within the tangential critical curve.

extract_attribute(cls, attr_name)

Returns an attribute of a class in the tracer as a ValueIrregular or Grid2DIrregular object.

extract_attributes_of_galaxies(cls, attr_name)

Returns an attribute of a class in the tracer as a list of ValueIrregular or Grid2DIrregular objects, where the indexes of the list correspond to the tracer’s galaxies.

extract_attributes_of_planes(cls, attr_name)

Returns an attribute of a class in the tracer as a list of ValueIrregular or Grid2DIrregular objects, where the indexes of the list correspond to the tracer’s planes.

extract_plane_index_of_profile(profile_name)

Returns the plane index of a LightProfile`, MassProfile or Point from the Tracer using the name of that component.

extract_profile(profile_name)

Returns a LightProfile, MassProfile or Point from the Tracer using the name of that component.

from_dict(cls_dict)

Instantiate an instance of a class from its dictionary representation.

from_galaxies(galaxies[, cosmology, Om0, …])

from_json(file_path)

Load the dictable object to a .json file, whereby all attributes are converted from the .json file’s dictionary representation to create the instance of the object

galaxy_blurred_image_2d_dict_via_convolver_from(…)

Evaluate the light object’s dictionary mapping galaixes to their corresponding 2D images and convolve each image with a PSF.

galaxy_image_2d_dict_from(grid)

Returns a dictionary associating every Galaxy object in the Tracer with its corresponding 2D image, using the instance of each galaxy as the dictionary keys.

galaxy_visibilities_dict_via_transformer_from(…)

Evaluate the light object’s dictionary mapping galaixes to their corresponding 2D images and transform each image to arrays of visibilities using a autoarray.operators.transformer.Transformer object and therefore a Fourier Transform.

grid_2d_at_redshift_from(grid, redshift)

For an input grid of (y,x) arc-second image-plane coordinates, ray-trace the coordinates to any redshift in the strong lens configuration.

hessian_from(grid[, buffer, deflections_func])

Returns the Hessian of the lensing object, where the Hessian is the second partial derivatives of the the potential (see equation 55 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

hyper_noise_map_from(noise_map)

hyper_noise_map_list_from(noise_map)

image_2d_from(grid)

image_2d_list_from(grid)

inversion_imaging_from(grid, image, …[, …])

inversion_interferometer_from(grid, …[, …])

jacobian_from(grid)

Returns the Jacobian of the lensing object, which is computed by taking the gradient of the 2D deflection angle map in four direction (positive y, negative y, positive x, negative x).

linear_obj_list_from(grid[, …])

magnification_2d_from(grid)

Returns the 2D magnification map of lensing object, which is computed as the inverse of the determinant of the jacobian.

magnification_2d_via_hessian_from(grid[, …])

Returns the 2D magnification map of lensing object, which is computed from the 2D deflection angle map via the Hessian using the expressions (see equation 60 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

output_to_json(file_path)

Output the dictable object to a .json file, whereby all attributes are converted to a dictionary representation first.

padded_image_2d_from(grid, psf_shape_2d)

Evaluate the light object’s 2D image from a input 2D grid of padded coordinates, where this padding is sufficient to encapsulate all surrounding pixels that will blur light into the original image given the 2D shape of the PSF’s kernel..

plane_with_galaxy(galaxy)

potential_2d_from(grid)

radial_caustic_from(grid[, pixel_scale])

Returns the radial caustic of lensing object, which is computed as follows:

radial_critical_curve_from(grid[, pixel_scale])

Returns the radial critical curve of lensing object, which is computed as follows:

radial_eigen_value_from(grid[, jacobian])

Returns the radial eigen values of lensing jacobian, which are given by the expression:

set_snr_of_snr_light_profiles(grid, …[, …])

shear_yx_2d_via_hessian_from(grid[, buffer])

Returns the 2D (y,x) shear vectors of the lensing object, which are computed from the 2D deflection angle map via the Hessian using the expressions (see equation 57 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

shear_yx_2d_via_jacobian_from(grid[, jacobian])

Returns the 2D (y,x) shear vectors of the lensing object, which are computed from the 2D deflection angle map via the Jacobian using the expression (see equation 58 https://www.tau.ac.il/~lab3/MICROLENSING/JeruLect.pdf):

sliced_tracer_from(lens_galaxies, …[, …])

Ray-tracer for a lens system with any number of planes.

sparse_image_plane_grid_pg_list_from(grid[, …])

Specific pixelizations, like the VoronoiMagnification, begin by determining what will become its the source-pixel centres by calculating them in the image-plane.

tangential_caustic_from(grid[, pixel_scale])

Returns the tangential caustic of lensing object, which is computed as follows:

tangential_critical_curve_from(grid[, …])

Returns the tangential critical curve of lensing object, which is computed as follows:

tangential_eigen_value_from(grid[, jacobian])

Returns the tangential eigen values of lensing jacobian, which are given by the expression:

traced_grid_2d_list_from(grid[, …])

Performs multi-plane ray tracing on a 2D grid of Cartesian (y,x) coordinates using the mass profiles of the galaxies and planes contained within the tracer.

traced_grid_2d_list_of_inversion_from(grid)

traced_sparse_grid_pg_list_from(grid[, …])

Ray-trace the sparse image plane grid used to define the source-pixel centres by calculating the deflection angles at (y,x) coordinate on the grid from the galaxy mass profiles and then ray-trace them from the image-plane to the source plane.

unmasked_blurred_image_2d_list_via_psf_from(…)

Evaluate the light object’s list of 2D images from a input 2D grid of coordinates and convolve it with a PSF, using a grid which is not masked.

unmasked_blurred_image_2d_via_psf_from(grid, psf)

Evaluate the light object’s 2D image from a input 2D grid of coordinates and convolve it with a PSF, using a grid which is not masked.

visibilities_list_via_transformer_from(grid, …)

Evaluate the light object’s list of 2D image from a input 2D grid of coordinates and transform each image to arrays of visibilities using a autoarray.operators.transformer.Transformer object and therefore a Fourier Transform.

visibilities_via_transformer_from(grid, …)

Evaluate the light object’s 2D image from a input 2D grid of coordinates and transform this to an array of visibilities using a autoarray.operators.transformer.Transformer object and therefore a Fourier Transform.

Attributes

all_planes_have_redshifts

contribution_map

contribution_map_list

galaxies

has_hyper_galaxy

has_light_profile

has_mass_profile

has_pixelization

has_regularization

hyper_galaxy_image_pg_list

image_plane

mass_profile_list

pixelization_list

pixelization_pg_list

plane_indexes_with_pixelizations

regularization_list

regularization_pg_list

source_plane

total_planes

upper_plane_index_with_light_profile