Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions autoarray/preloads/interferometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand All @@ -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,
)
6 changes: 6 additions & 0 deletions test_autoarray/preloads/test_preloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
Loading