@@ -59,8 +59,8 @@ class Prior:
5959 on the `parameter_scale` scale).
6060 :param bounds: The untransformed bounds of the sample (lower, upper).
6161 :param transformation: The transformation of the distribution.
62- :param bounds_truncate: Whether the generated prior will be truncated
63- at the bounds.
62+ :param _bounds_truncate: **deprecated**
63+ Whether the generated prior will be truncated at the bounds.
6464 If ``True``, the probability density will be rescaled
6565 accordingly and the sample is generated from the truncated
6666 distribution.
@@ -75,7 +75,7 @@ def __init__(
7575 parameters : tuple ,
7676 bounds : tuple = None ,
7777 transformation : str = C .LIN ,
78- bounds_truncate : bool = True ,
78+ _bounds_truncate : bool = True ,
7979 ):
8080 if transformation not in C .PARAMETER_SCALES :
8181 raise ValueError (
@@ -97,7 +97,7 @@ def __init__(
9797 self ._parameters = parameters
9898 self ._bounds = bounds
9999 self ._transformation = transformation
100- self ._bounds_truncate = bounds_truncate
100+ self ._bounds_truncate = _bounds_truncate
101101
102102 truncation = bounds
103103 if truncation is not None :
@@ -267,14 +267,14 @@ def neglogprior(
267267 def from_par_dict (
268268 d ,
269269 type_ = Literal ["initialization" , "objective" ],
270- bounds_truncate : bool = True ,
270+ _bounds_truncate : bool = True ,
271271 ) -> Prior :
272272 """Create a distribution from a row of the parameter table.
273273
274274 :param d: A dictionary representing a row of the parameter table.
275275 :param type_: The type of the distribution.
276- :param bounds_truncate : Whether the generated prior will be truncated
277- at the bounds.
276+ :param _bounds_truncate : Whether the generated prior will be truncated
277+ at the bounds. **deprecated**.
278278 :return: A distribution object.
279279 """
280280 dist_type = d .get (f"{ type_ } PriorType" , C .PARAMETER_SCALE_UNIFORM )
@@ -300,7 +300,7 @@ def from_par_dict(
300300 parameters = params ,
301301 bounds = (d [C .LOWER_BOUND ], d [C .UPPER_BOUND ]),
302302 transformation = pscale ,
303- bounds_truncate = bounds_truncate ,
303+ _bounds_truncate = _bounds_truncate ,
304304 )
305305
306306
@@ -329,6 +329,12 @@ def priors_to_measurements(problem: Problem):
329329 - `measurement`: the PDF location
330330 - `noiseFormula`: the PDF scale
331331
332+ .. warning::
333+
334+ This function does not account for the truncation of the prior by
335+ the bounds in the parameter table. The resulting observable will
336+ not be truncated, and the PDF will not be rescaled.
337+
332338 Arguments
333339 ---------
334340 problem:
0 commit comments