@@ -23,7 +23,7 @@ def __init__(
2323 pixel_scale_precision : float ,
2424 magnification_threshold = 0.1 ,
2525 neighbor_degree : int = 1 ,
26- xp = np
26+ xp = np ,
2727 ):
2828 """
2929 Determine the image plane coordinates that are traced to be a source plane coordinate.
@@ -144,9 +144,13 @@ def for_limits_and_scale(
144144 """
145145
146146 if xp .__name__ .startswith ("jax" ):
147- from autoarray .structures .triangles .coordinate_array import CoordinateArrayTriangles as triangle_cls
147+ from autoarray .structures .triangles .coordinate_array import (
148+ CoordinateArrayTriangles as triangle_cls ,
149+ )
148150 else :
149- from autoarray .structures .triangles .coordinate_array_np import CoordinateArrayTrianglesNp as triangle_cls
151+ from autoarray .structures .triangles .coordinate_array_np import (
152+ CoordinateArrayTrianglesNp as triangle_cls ,
153+ )
150154
151155 initial_triangles = triangle_cls .for_limits_and_scale (
152156 y_min = y_min ,
@@ -196,10 +200,7 @@ def _plane_grid(
196200 plane_index = tracer .plane_index_via_redshift_from (redshift = plane_redshift )
197201
198202 deflections = tracer .deflections_between_planes_from (
199- grid = grid ,
200- plane_i = 0 ,
201- plane_j = plane_index ,
202- xp = self ._xp
203+ grid = grid , plane_i = 0 , plane_j = plane_index , xp = self ._xp
203204 )
204205 # noinspection PyTypeChecker
205206 return grid .grid_2d_via_deflection_grid_from (deflection_grid = deflections )
@@ -265,9 +266,7 @@ def _filter_low_magnification(
265266 """
266267 points = self ._xp .array (points )
267268 magnifications = tracer .magnification_2d_via_hessian_from (
268- grid = aa .Grid2DIrregular (points ).array ,
269- buffer = self .scale ,
270- xp = self ._xp
269+ grid = aa .Grid2DIrregular (points ).array , buffer = self .scale , xp = self ._xp
271270 )
272271 mask = self ._xp .abs (magnifications .array ) > self .magnification_threshold
273272 return self ._xp .where (mask [:, None ], points , self ._xp .nan )
0 commit comments