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
8 changes: 7 additions & 1 deletion autolens/imaging/model/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ def log_likelihood_function(self, instance: af.ModelInstance) -> float:
xp=self._xp
)

return self.fit_from(instance=instance).figure_of_merit - log_likelihood_penalty
if self.use_jax:
return self.fit_from(instance=instance).figure_of_merit - log_likelihood_penalty

try:
return self.fit_from(instance=instance).log_likelihood - log_likelihood_penalty
except Exception as e:
raise af.exc.FitException

def fit_from(
self,
Expand Down
3 changes: 2 additions & 1 deletion autolens/imaging/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def via_deflections_and_galaxies_from(self, deflections : aa.VectorYX2D, galaxie
values=grid - deflections,
mask=grid.mask,
over_sample_size=1,
over_sampled=grid - deflections
over_sampled=grid - deflections,
over_sampler=grid.over_sampler
)

image = sum(map(lambda g: g.image_2d_from(grid=deflected_grid), galaxies))
Expand Down
1 change: 1 addition & 0 deletions autolens/interferometer/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def via_deflections_and_galaxies_from(
mask=grid.mask,
over_sample_size=1,
over_sampled=grid - deflections,
over_sampler=grid.over_sampler
)

image = sum(map(lambda g: g.image_2d_from(grid=deflected_grid), galaxies))
Expand Down
1 change: 1 addition & 0 deletions autolens/lens/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def traced_grid_2d_list_from(
mask=grid.mask,
over_sampled=grid_2d_over_sampled_list[i],
over_sample_size=grid.over_sample_size,
over_sampler=grid.over_sampler
)

grid_2d_new_list.append(grid_2d_new)
Expand Down
Loading