autoarray.inversion.mesh.mesh.RectangularBilinearAdaptImage#
- class RectangularBilinearAdaptImage[source]#
Bases:
RectangularRTUAdaptImageA rectangular mesh of pixels used to reconstruct a source on a regular grid, with adaptive weighting driven by an external adapt image and the empirical rank-CDF transform.
The mesh geometry is fixed and defined by a 2D shape (total_y_pixels, total_x_pixels). Pixels are indexed in row-major order:
Index 0 corresponds to the top-left pixel.
Indices increase left-to-right across rows and top-to-bottom between 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 the mesh adapts to, computed from the adapt image: clipped, raised to weight_power, floored at weight_floor and normalized to sum to 1.
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.
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.