From 62f7c54ab892cc99e5f448993dee30676b74c574 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 8 Jan 2025 12:46:31 +0000 Subject: [PATCH] should more model positions give a higher likelihood? --- .../point/model/test_andrew_implementation.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test_autolens/point/model/test_andrew_implementation.py b/test_autolens/point/model/test_andrew_implementation.py index dfcddd5e3..f09bd6a77 100644 --- a/test_autolens/point/model/test_andrew_implementation.py +++ b/test_autolens/point/model/test_andrew_implementation.py @@ -66,3 +66,27 @@ def test_nan_model_positions( ], ) assert fit.log_likelihood() == -4.40375330990644 + + +def test_duplicate_model_position( + data, + noise_map, +): + model_positions = np.array( + [ + (-1.0749, -1.1), + (1.19117, 1.175), + (1.19117, 1.175), + ] + ) + fit = Fit( + data=data, + noise_map=noise_map, + model_positions=model_positions, + ) + + assert np.allclose( + fit.all_permutations_log_likelihoods(), + [-1.14237812, -0.87193683], + ) + assert fit.log_likelihood() == -4.211539531047171