autoarray.inversion.mesh.mesh.RectangularBilinearAdaptDensity#
- class RectangularBilinearAdaptDensity[source]#
Bases:
RectangularRTUAdaptDensityA rectangular mesh of pixels used to reconstruct a source on a regular grid, whose pixels adapt to the density of the traced source-plane coordinates through the empirical rank-CDF transform.
The mesh is defined by a 2D shape (total_y_pixels, total_x_pixels) and is indexed in row-major order:
Index 0 corresponds to the top-left pixel.
Indices increase from left to right across each row, and from top to bottom across rows.
Methods
interpolator_fromMapper objects describe the mappings between pixels in the masked 2D data and the pixels in a pixelization, in both the data and source frames.
mesh_weight_map_fromThe weight map of a rectangular pixelization is None, because magnificaiton adaption uses the distribution and density of traced (y,x) coordinates in the source plane and not weights or the adapt data.
relocated_grid_fromRelocates all coordinates of the input source_plane_data_grid that are outside of a border (which is defined by a grid of (y,x) coordinates) to the edge of this border.
relocated_mesh_grid_fromRelocates all coordinates of the input source_plane_mesh_grid that are outside of a border (which is defined by a grid of (y,x) coordinates) to the edge of this border.
zeroed_pixels_fromReturn the positive mesh-local indices of the pixels the inversion holds at zero, for a mapper whose parameter block is pixels long.
Attributes
interpolator_clsExtra keyword arguments interpolator_from forwards to interpolator_cls — the rank-CDF transform selector; the empirical rank CDF has no kernel hyperparameters.
supports_split_regularizationWhether this mesh supports "split" regularization schemes (e.g.
ConstantSplit,AdaptSplit,AdaptSplitZeroth).zeroed_pixelsReturn the positive 1D pixel indices of the edge pixels in a rectangular mesh.