autoarray.inversion.pixelizations.Rectangular

class autoarray.inversion.pixelizations.Rectangular(shape=(3, 3))
__init__(shape=(3, 3))

A rectangular pixelization, where pixels are defined on a Cartesian and uniform grid of shape (total_y_pixels, total_x_pixels).

Like structures, the indexing of the rectangular grid begins in the top-left corner and goes right and down.

Parameters:shape – The dimensions of the rectangular grid of pixels (y_pixels, x_pixel)

Methods

__init__([shape]) A rectangular pixelization, where pixels are defined on a Cartesian and uniform grid of shape (total_y_pixels, total_x_pixels).
make_pixelization_grid([relocated_grid, …])
mapper_from(grid, sparse_grid, …) Setup a rectangular mapper from a rectangular pixelization, as follows:
relocate_grid_via_border(grid, settings, …) Return all coordinates that are outside the pixelization border to the edge of the border.
relocate_pixelization_grid_via_border(grid, …)
sparse_grid_from(grid, hyper_image[, settings])
weight_map_from(hyper_image)
mapper_from(grid: autoarray.structures.grids.two_d.grid_2d.Grid2D, sparse_grid: autoarray.structures.grids.two_d.grid_2d.Grid2D = None, sparse_image_plane_grid: autoarray.structures.grids.two_d.grid_2d.Grid2D = None, hyper_image: numpy.ndarray = None, settings: autoarray.inversion.pixelizations.settings.SettingsPixelization = <autoarray.inversion.pixelizations.settings.SettingsPixelization object>, preloads: autoarray.preloads.Preloads = <autoarray.preloads.Preloads object>, profiling_dict: Optional[Dict[KT, VT]] = None)

Setup a rectangular mapper from a rectangular pixelization, as follows:

  1. If a border is supplied, relocate all of the grid’s and sub grid pixels beyond the border.
  2. Determine the rectangular pixelization’s geometry, by laying the pixelization over the sub-grid.
  3. Setup the rectangular mapper from the relocated grid and rectangular pixelization.
Parameters:
  • grid (aa.Grid2D) – A stack of grid describing the observed image’s pixel coordinates (e.g. an image-grid, sub-grid, etc.).
  • border (aa.GridBorder I None) – The border of the grid’s grid.
  • hyper_image – A pre-computed hyper-image of the image the mapper is expected to reconstruct, used for adaptive analysis.