From 93efbfb7ad6375ce1f812a4cf1a7d0c45f8fa8b9 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 30 Sep 2024 16:13:34 +0100 Subject: [PATCH 1/2] imitate tracer api for point solver --- autogalaxy/operate/deflections.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autogalaxy/operate/deflections.py b/autogalaxy/operate/deflections.py index 28f01958..eeacb93c 100644 --- a/autogalaxy/operate/deflections.py +++ b/autogalaxy/operate/deflections.py @@ -104,6 +104,13 @@ class OperateDeflections: The function which returns the mass object's 2D deflection angles. """ + @property + def plane_redshifts(self) -> List[float]: + return [] + + def deflections_between_planes_from(self, grid, plane_i: int, plane_j: int): + return self.deflections_yx_2d_from(grid=grid) + def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, **kwargs): raise NotImplementedError From 6b943718c3201bd0e365bbaf905e397264e8ff46 Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 30 Sep 2024 16:24:28 +0100 Subject: [PATCH 2/2] docs --- autogalaxy/operate/deflections.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autogalaxy/operate/deflections.py b/autogalaxy/operate/deflections.py index eeacb93c..f2cf4a5c 100644 --- a/autogalaxy/operate/deflections.py +++ b/autogalaxy/operate/deflections.py @@ -106,9 +106,16 @@ class OperateDeflections: @property def plane_redshifts(self) -> List[float]: + """ + Imitating tracer API but with no planes + """ return [] def deflections_between_planes_from(self, grid, plane_i: int, plane_j: int): + """ + Assumes a simple OperateDeflections object (e.g. mass profile) that only has + a single plane of deflections + """ return self.deflections_yx_2d_from(grid=grid) def deflections_yx_2d_from(self, grid: aa.type.Grid2DLike, **kwargs):