File tree Expand file tree Collapse file tree 3 files changed +4
-24
lines changed
Expand file tree Collapse file tree 3 files changed +4
-24
lines changed Original file line number Diff line number Diff line change @@ -128,5 +128,5 @@ def chi_squared(self) -> float:
128128 RMS noise-map values squared.
129129 """
130130 return ag .util .fit .chi_squared_from (
131- chi_squared_map = self .chi_squared_map ,
131+ chi_squared_map = self .chi_squared_map . array ,
132132 )
Original file line number Diff line number Diff line change 44import autoarray as aa
55from autoarray .structures .triangles .shape import Point
66
7- from autofit .jax_wrapper import jit , register_pytree_node_class
7+ from autofit .jax_wrapper import register_pytree_node_class
88from autogalaxy import OperateDeflections
99from .shape_solver import AbstractSolver
1010
1414
1515@register_pytree_node_class
1616class PointSolver (AbstractSolver ):
17- @ jit
17+
1818 def solve (
1919 self ,
2020 tracer : OperateDeflections ,
@@ -55,21 +55,3 @@ def solve(
5555 )
5656
5757 return aa .Grid2DIrregular ([pair for pair in filtered_means ])
58-
59- # filtered_means = [
60- # pair for pair in filtered_means if not np.any(np.isnan(pair)).all()
61- # ]
62- #
63- # difference = len(kept_triangles.means) - len(filtered_means)
64- # if difference > 0:
65- # logger.debug(
66- # f"Filtered one multiple-image with magnification below threshold."
67- # )
68- # elif difference > 1:
69- # logger.warning(
70- # f"Filtered {difference} multiple-images with magnification below threshold."
71- # )
72- #
73- # return aa.Grid2DIrregular(
74- # [pair for pair in filtered_means if not np.isnan(pair).all()]
75- # )
Original file line number Diff line number Diff line change 11import jax .numpy as jnp
2- from jax import jit
32import logging
43import math
54
@@ -208,7 +207,6 @@ def _source_plane_grid(
208207 # noinspection PyTypeChecker
209208 return grid .grid_2d_via_deflection_grid_from (deflection_grid = deflections )
210209
211- @jit
212210 def solve_triangles (
213211 self ,
214212 tracer : OperateDeflections ,
@@ -270,7 +268,7 @@ def _filter_low_magnification(
270268 """
271269 points = jnp .array (points )
272270 magnifications = tracer .magnification_2d_via_hessian_from (
273- grid = aa .Grid2DIrregular (points ),
271+ grid = aa .Grid2DIrregular (points ). array ,
274272 buffer = self .scale ,
275273 )
276274 mask = jnp .abs (magnifications .array ) > self .magnification_threshold
You can’t perform that action at this time.
0 commit comments