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)[source]#
__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)[source]#

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:

  1. 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.

  2. 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.

  3. 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.

Methods

__init__(grid[, use_upscaling, ...])

Given a OperateDeflections (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) source-plane 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)