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: 6 additions & 3 deletions autogalaxy/interferometer/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


class SimulatorInterferometer(aa.SimulatorInterferometer):
def via_galaxies_from(self, galaxies: List[Galaxy], grid: aa.type.Grid2DLike):
def via_galaxies_from(self, galaxies: List[Galaxy], grid: aa.type.Grid2DLike, xp=None):
"""
Returns a realistic simulated image by applying effects to a plain simulated image.

Expand All @@ -37,8 +37,11 @@ def via_galaxies_from(self, galaxies: List[Galaxy], grid: aa.type.Grid2DLike):
A seed for random noise_maps generation
"""

if xp is None:
xp = self._xp

galaxies = Galaxies(galaxies=galaxies)

image = galaxies.image_2d_from(grid=grid)
image = galaxies.image_2d_from(grid=grid, xp=xp)

return self.via_image_from(image=image)
return self.via_image_from(image=image, xp=xp)
Loading