- 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 OperateDeflections (e.g. a _MassProfile, Galaxy, Plane or Tracer) this class uses their deflections_yx_2d_from method to determine the (y,x) coordinates the multiple-images appear given a (y,x) source-centre coordinate in the source-plane.
This is performed as follows:
For an initial input grid, compute all deflection angles, map their values to source-plane and compute the distance of each traced coordinate to the source-plane centre.
Find the ‘peak’ pixels on the image-plane grid. A peak pixel is one that traces closer to the centre of the source in the source-plane 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 non-multiple image still traces closer than its 8 neighbors. Depending on how the PositionFinder is being used these can be removed.
__init__(grid[, use_upscaling, …])
Given a OperateDeflections (e.g.
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) source-plane coordinate than any of its 8 adjacent neighbors.
Remove all coordinates from a grid which are within the distance_to_mass_profile_centre attribute of any mass profile of the lensing object.
For an input grid of (y,x) coordinates, remove all coordinates that do not trace within a threshold distance
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.