22import logging
33import math
44
5- from typing import Tuple , List , Iterator , Type , Optional
5+ from typing import Tuple , List , Iterator , Optional
66
77import autoarray as aa
88
99from autoarray .structures .triangles .shape import Shape
1010from autofit .jax_wrapper import register_pytree_node_class
1111
12- from autoarray .structures .triangles .coordinate_array . jax_coordinate_array import (
12+ from autoarray .structures .triangles .coordinate_array import (
1313 CoordinateArrayTriangles ,
1414)
1515from autoarray .structures .triangles .abstract import AbstractTriangles
@@ -59,7 +59,6 @@ def for_grid(
5959 grid : aa .Grid2D ,
6060 pixel_scale_precision : float ,
6161 magnification_threshold = 0.1 ,
62- array_triangles_cls : Type [AbstractTriangles ] = CoordinateArrayTriangles ,
6362 neighbor_degree : int = 1 ,
6463 ):
6564 """
@@ -75,9 +74,6 @@ def for_grid(
7574 The precision to which the triangles should be subdivided.
7675 magnification_threshold
7776 The threshold for the magnification under which multiple images are filtered.
78- array_triangles_cls
79- The class to use for the triangles. JAX is used implicitly if USE_JAX=1 and
80- jax is installed.
8177 max_containing_size
8278 Only applies to JAX. This is the maximum number of multiple images expected.
8379 We need to know this in advance to allocate memory for the JAX array.
@@ -106,7 +102,6 @@ def for_grid(
106102 scale = scale ,
107103 pixel_scale_precision = pixel_scale_precision ,
108104 magnification_threshold = magnification_threshold ,
109- array_triangles_cls = array_triangles_cls ,
110105 neighbor_degree = neighbor_degree ,
111106 )
112107
@@ -120,7 +115,6 @@ def for_limits_and_scale(
120115 scale = 0.1 ,
121116 pixel_scale_precision : float = 0.001 ,
122117 magnification_threshold = 0.1 ,
123- array_triangles_cls : Type [AbstractTriangles ] = CoordinateArrayTriangles ,
124118 neighbor_degree : int = 1 ,
125119 ):
126120 """
@@ -141,17 +135,14 @@ def for_limits_and_scale(
141135 The precision to which the triangles should be subdivided.
142136 magnification_threshold
143137 The threshold for the magnification under which multiple images are filtered.
144- array_triangles_cls
145- The class to use for the triangles. JAX is used implicitly if USE_JAX=1 and
146- jax is installed.
147138 neighbor_degree
148139 The number of times recursively add neighbors for the triangles that contain
149140
150141 Returns
151142 -------
152143 The solver.
153144 """
154- initial_triangles = array_triangles_cls .for_limits_and_scale (
145+ initial_triangles = CoordinateArrayTriangles .for_limits_and_scale (
155146 y_min = y_min ,
156147 y_max = y_max ,
157148 x_min = x_min ,
@@ -310,6 +301,7 @@ def steps(
310301 An iterator over the steps of the triangle solver algorithm.
311302 """
312303 initial_triangles = self .initial_triangles
304+
313305 for number in range (self .n_steps ):
314306 plane_triangles = self ._plane_triangles (
315307 tracer = tracer ,
0 commit comments