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

use the new jax coordinate array triangles #317

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test_autolens/point/triangles/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import autolens as al
import autogalaxy as ag
from autoarray.structures.triangles.array import ArrayTriangles
from autoarray.structures.triangles.jax_coordinate_array import ArrayTriangles
from autolens.mock import NullTracer
from autolens.point.solver import PointSolver

Expand Down
12 changes: 7 additions & 5 deletions test_autolens/point/triangles/test_solver_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
from autolens import PointSolver

try:
from autoarray.structures.triangles.jax_array import ArrayTriangles
from autoarray.structures.triangles.coordinate_array import CoordinateArrayTriangles
except ImportError:
from autoarray.structures.triangles.array import ArrayTriangles
from autoarray.structures.triangles.jax_coordinate_array import (
CoordinateArrayTriangles,
)

from autolens.mock import NullTracer

Expand All @@ -28,7 +30,7 @@ def solver(grid):
return PointSolver.for_grid(
grid=grid,
pixel_scale_precision=0.01,
array_triangles_cls=ArrayTriangles,
array_triangles_cls=CoordinateArrayTriangles,
)


Expand Down Expand Up @@ -72,7 +74,7 @@ def test_real_example(grid, tracer):
solver = PointSolver.for_grid(
grid=grid,
pixel_scale_precision=0.001,
array_triangles_cls=ArrayTriangles,
array_triangles_cls=CoordinateArrayTriangles,
)

result = solver.solve(tracer, (0.07, 0.07))
Expand All @@ -89,7 +91,7 @@ def _test_jax(grid):
solver = PointSolver.for_grid(
grid=grid,
pixel_scale_precision=0.001,
array_triangles_cls=ArrayTriangles,
array_triangles_cls=CoordinateArrayTriangles,
max_containing_size=size,
)

Expand Down
Loading