autolens.PointSolver¶

class
autolens.
PointSolver
(grid, use_upscaling=True, pixel_scale_precision=None, upscale_factor=2, magnification_threshold=0.0, distance_to_source_centre=None, distance_to_mass_profile_centre=None)¶ 
__init__
(grid, use_upscaling=True, pixel_scale_precision=None, upscale_factor=2, magnification_threshold=0.0, distance_to_source_centre=None, distance_to_mass_profile_centre=None)¶ Given a LensingObject (e.g. a _MassProfile, Galaxy, Plane or Tracer) this class uses their deflections_2d_from method to determine the (y,x) coordinates the multipleimages appear given a (y,x) sourcecentre coordinate in the sourceplane.
This is performed as follows:
 For an initial input grid, compute all deflection angles, map their values to sourceplane and compute the distance of each traced coordinate to the sourceplane centre.
 Find the ‘peak’ pixels on the imageplane grid. A peak pixel is one that traces closer to the centre of the source in the sourceplane than it 8 direct neighboring adjacent pixels.
 For every peak pixel, create a higher resolution grid around it and centred on it and using this higher resolution grid find its peak pixel.
This process thus finds a set of ‘peak’ pixels and iteratively refines their values by locating them for higher and higher resolution grids. The following occurances may happen during this process:
 A peak pixel may ‘split’ into multiple images. This is to be expected, when genuine multiple images were previously merged into one due to the grid being too low resolution.
 Image pixels which do not correspond to genuine multiple images may be detected as they meet the peak criteria. This can occurance in certain circumstances where a nonmultiple image still traces closer than its 8 neighbors. Depending on how the PositionFinder is being used these can be removed.
Methods
__init__
(grid[, use_upscaling, …])Given a LensingObject (e.g. grid_buffed_and_upscaled_around_coordinate_from
(…)For an input (y,x) Catersian coordinate create a buffed and upscaled square grid of (y,x) coordinates where: grid_peaks_from
(deflections_func, grid, …)Find the ‘peaks’ of a grid of coordinates, where a peak corresponds to a (y,x) coordinate on the grid which traces closer to the input (y,x) sourceplane coordinate than any of its 8 adjacent neighbors. grid_with_coordinates_to_mass_profile_centre_removed_from
(…)Remove all coordinates from a grid which are within the distance_to_mass_profile_centre attribute of any mass profile of the lensing object. grid_with_points_below_magnification_threshold_removed
(…)grid_within_distance_of_source_plane_centre
(…)For an input grid of (y,x) coordinates, remove all coordinates that do not trace within a threshold distance refined_coordinates_from
(deflections_func, …)For an input (y,x) coordinate, determine a set of refined coordinates that are computed by locating peak pixels on a higher resolution grid around that pixel. solve
(lensing_obj, source_plane_coordinate)
refined_coordinates_from
(deflections_func, coordinate, pixel_scale, source_plane_coordinate)¶ For an input (y,x) coordinate, determine a set of refined coordinates that are computed by locating peak pixels on a higher resolution grid around that pixel.
This may return 1 or multiple refined coordinates. Multiple coordinates occur when the peak ‘splits’ into multiple images.
Parameters:  coordinate ((float, float)) – The (y,x) coordinate around which the upscaled grid used to fin the refined coordinates is computed.
 pixel_scales ((float, float)) – The pixelscale resolution of the buffed and upscaled grid that is formed around the input coordinate. If upscale > 1, the pixel_scales are reduced to pixel_scale / upscale_factor.
 lensing_obj (autogalaxy.LensingObject) – An object which has a deflection_2d_from method for performing lensing calculations, for example a MassProfile, _Galaxy_, Plane or Tracer.
 source_plane_coordinate ((float, float)) – The (y,x) coordinate in the sourceplane pixels that the distance of traced grid coordinates are computed for.
