Skip to content

Commit

Permalink
adapt images removed subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Dec 22, 2023
1 parent c7c0441 commit 55856e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
7 changes: 0 additions & 7 deletions autolens/analysis/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ def positions_likelihood_from(
return PositionsLHPenalty(positions=positions, threshold=threshold)
return PositionsLHResample(positions=positions, threshold=threshold)

@property
def path_galaxy_tuples(self) -> [(str, ag.Galaxy)]:
"""
Tuples associating the names of galaxies with instances from the best fit
"""
return self.instance.path_instance_tuples_for_class(cls=ag.Galaxy)


class ResultDataset(Result):
@property
Expand Down
1 change: 0 additions & 1 deletion autolens/imaging/model/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def max_log_likelihood_tracer(self) -> Tracer:
The `Tracer` is computed from the `max_log_likelihood_fit`, as this ensures that all linear light profiles
are converted to normal light profiles with their `intensity` values updated.
"""

return (
self.max_log_likelihood_fit.model_obj_linear_light_profiles_to_light_profiles
)
Expand Down
8 changes: 4 additions & 4 deletions test_autolens/analysis/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,11 @@ def test___image_dict(analysis_imaging_7x7):
)

image_dict = result.image_galaxy_dict
assert isinstance(image_dict[("galaxies", "lens")], np.ndarray)
assert isinstance(image_dict[("galaxies", "source")], np.ndarray)
assert isinstance(image_dict[str(("galaxies", "lens"))], np.ndarray)
assert isinstance(image_dict[str(("galaxies", "source"))], np.ndarray)

result.instance.galaxies.lens = al.Galaxy(redshift=0.5)

image_dict = result.image_galaxy_dict
assert (image_dict[("galaxies", "lens")].native == np.zeros((7, 7))).all()
assert isinstance(image_dict[("galaxies", "source")], np.ndarray)
assert (image_dict[str(("galaxies", "lens"))].native == np.zeros((7, 7))).all()
assert isinstance(image_dict[str(("galaxies", "source"))], np.ndarray)

0 comments on commit 55856e9

Please sign in to comment.