Closed Jammy2211 closed 7 months ago
Refactor pixelizations to support separate inputs for the mesh (e.g. Voronoi) and the image-mesh which defines how the image-plane grid of mesh centres are computed.
mesh
Voronoi
This means the following API:
pixelization = al.Pixelization( mesh=al.mesh.VoronoiMagnification(shape=(25, 25)), regularization=al.reg.Constant(coefficient=1.0), )
Is now the following API (noting that Magnification has been replaced with the nameOverlay`):
Magnification has been replaced with the name
pixelization = al.Pixelization( image_mesh=al.image_mesh.Overlay(shape=(25, 25)), mesh=al.mesh.Voronoi(), regularization=al.reg.Constant(coefficient=1.0), )
For model composition the following API is used:
image_mesh = af.Model(al.image_mesh.Overlay) image_mesh.shape = (30, 30) mesh = af.Model(al.mesh.Delaunay) regularization = af.Model(al.reg.ConstantSplit) pixelization = af.Model( al.Pixelization, image_mesh=image_mesh, mesh=mesh, regularization=regularization )
Shortly following PR will be a new image_mesh which adapts the pixels via the Hilbert curve.
image_mesh
Refactor pixelizations to support separate inputs for the
mesh
(e.g.Voronoi
) and the image-mesh which defines how the image-plane grid of mesh centres are computed.This means the following API:
Is now the following API (noting that
Magnification has been replaced with the name
Overlay`):For model composition the following API is used:
Shortly following PR will be a new
image_mesh
which adapts the pixels via the Hilbert curve.