File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ def positions_likelihood_from(
263263 self ,
264264 factor = 1.0 ,
265265 minimum_threshold = None ,
266+ maximum_threshold = None ,
266267 positions : Optional [aa .Grid2DIrregular ] = None ,
267268 mass_centre_radial_distance_min : float = None ,
268269 plane_redshift : Optional [float ] = None ,
@@ -289,6 +290,9 @@ def positions_likelihood_from(
289290 minimum_threshold
290291 The output threshold is rounded up to this value if it is below it, to avoid extremely small threshold
291292 values.
293+ maximum_threshold
294+ The output threshold is rounded down to this value if it is above it, to avoid extremely large threshold
295+ values.
292296 positions
293297 If input, these positions are used instead of the computed multiple image positions from the lens mass
294298 model.
@@ -380,6 +384,9 @@ def positions_likelihood_from(
380384 plane_redshift = plane_redshift ,
381385 )
382386
387+ if maximum_threshold is not None :
388+ threshold = min (threshold , maximum_threshold )
389+
383390 return PositionsLH (
384391 positions = positions , threshold = threshold , plane_redshift = plane_redshift
385392 )
You can’t perform that action at this time.
0 commit comments