autoarray.inversion.pixelization.image_mesh.Hilbert#
- class Hilbert[source]#
Bases:
AbstractImageMeshWeighted
Computes an image-mesh by computing the Hilbert curve of the adapt data and drawing points from it.
This requires an adapt-image, which is the image that the Hilbert curve algorithm adapts to in order to compute the image mesh. This could simply be the image itself, or a model fit to the image which removes certain features or noise.
For example, using the adapt image, the image mesh is computed as follows:
Convert the adapt image to a weight map, which is a 2D array of weight values.
2) Run the Hilbert algorithm on the weight map, such that the image mesh pixels cluster around the weight map values with higher values.
- Parameters:
pixels – The total number of pixels in the image mesh and drawn from the Hilbert curve.
weight_floor – The minimum weight value in the weight map, which allows more pixels to be drawn from the lower weight regions of the adapt image.
weight_power – The power the weight values are raised too, which allows more pixels to be drawn from the higher weight regions of the adapt image.
Methods
check_adapt_background_pixels
Checks the number of mesh pixels in the background of the image-mesh and raises an InversionException if there are fewer mesh pixels in the background than the input settings.
check_mesh_pixels_per_image_pixels
Checks the number of mesh pixels in every image pixel and raises an InversionException if there are fewer mesh pixels inside a certain number of image-pixels than the input settings.
Returns an image mesh by running the Hilbert curve on the weight map.
mesh_pixels_per_image_pixels_from
Returns an array containing the number of mesh pixels in every pixel of the data's mask.
weight_map_from
Returns the weight-map used by the image-mesh to compute the mesh pixel centres.
Attributes
uses_adapt_images
- rtype: