autoarray.inversion.pixelization.mesh.Voronoi#

class Voronoi[source]#

Bases: Triangulation

An irregular mesh of Voronoi pixels, which using no interpolation are paired with a 2D grid of (y,x) coordinates.

For a full description of how a mesh is paired with another grid, see the Pixelization API documentation.

The Voronoi mesh represents pixels as an irregular 2D grid of Voronoi cells.

A Pixelization using a Voronoi mesh has four grids associated with it:

  • image_plane_data_grid: The observed data grid in the image-plane (which is paired with the mesh in the source-plane).

  • image_plane_mesh_grid: The (y,x) mesh coordinates in the image-plane (which are the centres of Voronoi cells in the source-plane).

  • source_plane_data_grid: The observed data grid mapped to the source-plane (e.g. after gravitational lensing).

  • source_plane_mesh_grid: The centre of each Voronoi cell in the source-plane (the image_plane_mesh_grid maps to this after gravitational lensing).

Each (y,x) coordinate in the source_plane_data_grid is paired with all Voronoi cells it falls within, without using an interpolation scheme.

Methods

mapper_grids_from

Mapper objects describe the mappings between pixels in the masked 2D data and the pixels in a mesh,

mesh_grid_from

Return the Voronoi source_plane_mesh_grid as a Mesh2DVoronoi object, which provides additional functionality for performing operations that exploit the geometry of a Voronoi mesh.

relocated_grid_from

Relocates all coordinates of the input source_plane_data_grid that are outside of a

relocated_mesh_grid_from

Relocates all coordinates of the input source_plane_mesh_grid that are outside of a border (which

Attributes

requires_image_mesh

uses_interpolation

mesh_grid_from(source_plane_data_grid=None, source_plane_mesh_grid=None)[source]#

Return the Voronoi source_plane_mesh_grid as a Mesh2DVoronoi object, which provides additional functionality for performing operations that exploit the geometry of a Voronoi mesh.

Parameters:
  • source_plane_data_grid – A 2D grid of (y,x) coordinates associated with the unmasked 2D data after it has been transformed to the source reference frame.

  • source_plane_mesh_grid – The centres of every Voronoi pixel in the source frame, which are initially derived by computing a sparse set of (y,x) coordinates computed from the unmasked data in the data frame and applying a transformation to this.

  • settings – Settings controlling the pixelization for example if a border is used to relocate its exterior coordinates.

Return type:

Mesh2DVoronoi