diff --git a/autoarray/preloads/interferometer.py b/autoarray/preloads/interferometer.py index 0c5cbccd..b38269e9 100644 --- a/autoarray/preloads/interferometer.py +++ b/autoarray/preloads/interferometer.py @@ -2,7 +2,13 @@ class PreloadsInterferometer(AbstractPreloads): - def __init__(self, curvature_matrix=None, mapper_galaxy_dict=None): + def __init__( + self, + curvature_matrix=None, + mapper_galaxy_dict=None, + source_plane_mesh_grid=None, + image_plane_mesh_grid=None, + ): """ Preloaded quantities for an interferometer fit / inversion (see `AbstractPreloads`). @@ -24,5 +30,8 @@ def __init__(self, curvature_matrix=None, mapper_galaxy_dict=None): The pre-computed mapper(s) and their source association. See `AbstractPreloads`. """ super().__init__( - curvature_matrix=curvature_matrix, mapper_galaxy_dict=mapper_galaxy_dict + curvature_matrix=curvature_matrix, + mapper_galaxy_dict=mapper_galaxy_dict, + source_plane_mesh_grid=source_plane_mesh_grid, + image_plane_mesh_grid=image_plane_mesh_grid, ) diff --git a/test_autoarray/preloads/test_preloads.py b/test_autoarray/preloads/test_preloads.py index 81dcc72d..960ee475 100644 --- a/test_autoarray/preloads/test_preloads.py +++ b/test_autoarray/preloads/test_preloads.py @@ -27,3 +27,9 @@ def test__preloads_interferometer__mesh_fields_available_via_abstract(): assert preloads.curvature_matrix == "F" assert preloads.source_plane_mesh_grid is None assert preloads.image_plane_mesh_grid is None + + preloads = aa.PreloadsInterferometer( + curvature_matrix="F", source_plane_mesh_grid=[["mesh"]], image_plane_mesh_grid=[["im"]] + ) + assert preloads.source_plane_mesh_grid == [["mesh"]] + assert preloads.image_plane_mesh_grid == [["im"]]