Skip to content
Merged
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
9 changes: 7 additions & 2 deletions autolens/point/fit/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def __init__(
"""

self.name = name
if xp is not np and data._xp is not xp:
data = aa.Grid2DIrregular(values=data.array, xp=xp)
self._data = data
self._noise_map = noise_map
self.tracer = tracer
Expand Down Expand Up @@ -131,9 +133,12 @@ def magnifications_at_positions(self) -> aa.ArrayIrregular:
use_multi_plane=use_multi_plane,
plane_j=plane_j,
)
return abs(
od.magnification_2d_via_hessian_from(grid=self.positions, xp=self._xp)
magnifications = od.magnification_2d_via_hessian_from(
grid=self.positions, xp=self._xp
)
if self.use_jax:
magnifications = aa.ArrayIrregular(values=magnifications)
return abs(magnifications)

@property
def source_plane_coordinate(self) -> Tuple[float, float]:
Expand Down
Loading