Skip to content

Commit 158c97e

Browse files
author
Paul Kienzle
committed
bumps sliders do not support inf limits
1 parent bdbf066 commit 158c97e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

example/simul_fit.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import numpy as np
21
from bumps.names import FitProblem, FreeVariables
32

43
from sasdata import data_path
@@ -22,14 +21,14 @@
2221
model = Model(kernel, **pars)
2322

2423
# radius and polydispersity (if any) are shared
25-
model.radius.range(0, np.inf)
24+
model.radius.range(0, 3000.)
2625
#model.radius_pd.range(0, 1)
2726

2827
# Contrast and dilution are the same for both measurements, but are not
2928
# separable with a single measurement (i.e., I(q) ~ F(q) contrast^2 Vf),
3029
# so fit one of scale, sld or solvent sld. With absolute scaling from
3130
# data reduction, can use the same parameter for both datasets.
32-
model.scale.range(0, np.inf)
31+
model.scale.range(0, 1.0)
3332
#model.sld.range(-inf, inf)
3433
#model.sld_solvent.range(-inf, inf)
3534

@@ -39,7 +38,7 @@
3938
names=[data.run[0] for data in datasets],
4039
background=model.background,
4140
)
42-
free.background.range(-np.inf, np.inf)
41+
free.background.range(-1, 1)
4342

4443
# Note: can access the parameters for the individual models using
4544
# free.background[0] and free.background[1], setting constraints or

0 commit comments

Comments
 (0)