Skip to content

Commit

Permalink
Merge branch 'lenstronomy:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed May 15, 2024
2 parents 4f401ef + 58ce503 commit 1f493f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand All @@ -21,7 +21,7 @@ repos:
# https://pre-commit.com/#top_level-default_language_version
language_version: python3
- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black-jupyter
language_version: python3
Expand Down
6 changes: 3 additions & 3 deletions lenstronomy/Sampling/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def __init__(
:param num_point_source_list: list of number of point sources per point source model class
:param image_plane_source_list: optional, list of booleans for the source_light components.
If a component is set =True it will parameterized the positions in the image plane and ray-trace the
parameters back to the source position on the fly during the fitting.
parameters back to the source position on the fly during the fitting. If joint coordinates with other
source profiles, only one should be indicated as bool.
:param solver_type: string, option for specific solver type
see detailed instruction of the Solver4Point and Solver2Point classes
:param Ddt_sampling: bool, if True, samples the time-delay distance D_dt (in units of Mpc)
Expand Down Expand Up @@ -369,7 +370,6 @@ def __init__(
if num_point_source_list is None:
num_point_source_list = [1] * len(self._point_source_model_list)

# Attention: if joint coordinates with other source profiles, only indicate one as bool
if image_plane_source_list is None:
image_plane_source_list = [False] * len(self._source_light_model_list)
self._image_plane_source_list = image_plane_source_list
Expand Down Expand Up @@ -499,7 +499,7 @@ def __init__(

for lens_source_joint in self._joint_lens_with_source_light:
i_source = lens_source_joint[0]
if i_source in self._image_plane_source_list:
if self._image_plane_source_list[i_source]:
raise ValueError(
"linking a source light model with a lens model AND simultaneously parameterizing the"
" source position in the image plane is not valid!"
Expand Down

0 comments on commit 1f493f2

Please sign in to comment.