Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/image mesh refactor #242

Merged
merged 5 commits into from
Dec 19, 2023
Merged

Feature/image mesh refactor #242

merged 5 commits into from
Dec 19, 2023

Conversation

Jammy2211
Copy link
Owner

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:

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 name Overlay`):

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.

@Jammy2211 Jammy2211 merged commit 19dcb5a into main Dec 19, 2023
0 of 8 checks passed
@Jammy2211 Jammy2211 deleted the feature/image_mesh_refactor branch February 28, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant