Skip to content

Commit

Permalink
redundant call removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed Jun 24, 2024
1 parent 4e5690e commit 677046e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lenstronomy/Sampling/Likelihoods/position_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ def logL(self, kwargs_lens, kwargs_ps, kwargs_special, verbose=False):
return logL

def check_additional_images(self, kwargs_ps, kwargs_lens):
"""Checks whether additional images have been found and placed in kwargs_ps of
the first point source model.
"""Checks whether additional images have been found and placed in kwargs_ps
:param kwargs_ps: point source kwargs
:param kwargs_lens: lens model keyword arguments
Expand Down Expand Up @@ -168,6 +167,7 @@ def astrometric_likelihood(kwargs_ps, kwargs_special, sigma):
:return: log likelihood of the astrometirc correction between predicted image
positions and model placement of the point sources
"""
# TODO: make it compatible with multiple source instances
if not len(kwargs_ps) > 0:
return 0
if "ra_image" not in kwargs_ps[0]:
Expand Down Expand Up @@ -267,9 +267,9 @@ def source_position_likelihood(
if delta[0] ** 2 + delta[1] ** 2 > hard_bound_rms**2:
if verbose is True:
print(
"Image positions do not match to the same source position to the required "
"Image positions of image %s of model %s do not match to the same source position to the required "
"precision. Achieved: %s, Required: %s."
% (delta, hard_bound_rms)
% (i, k, delta, hard_bound_rms)
)
logL -= 10**3
try:
Expand Down
1 change: 0 additions & 1 deletion lenstronomy/Workflow/fitting_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def fit_sequence(self, fitting_list):
chain_list.append([fitting_type, chain, param])

elif fitting_type == "SIMPLEX":
self._updateManager.check_initial_state()
kwargs_result = self.simplex(**kwargs)
self._updateManager.update_param_state(**kwargs_result)
chain_list.append([fitting_type, kwargs_result])
Expand Down

0 comments on commit 677046e

Please sign in to comment.