Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c0eb28e
adaptive integration for cylinder using qr heuristic
Jul 25, 2025
5936967
add core shell bicelle; fix gpu build errors (mac)
Jul 29, 2025
e6126ac
adaptive integration for most shape models
Jul 30, 2025
e5703a1
[pre-commit.ci lite] apply automatic fixes for ruff linting errors
pre-commit-ci-lite[bot] Jul 30, 2025
bffeaf0
use sasmodels.compare -seed=<n> for reproducibile -sets
Jul 30, 2025
1c2b23c
adaptive integration for cylinder using qr heuristic
Jul 25, 2025
56630af
add core shell bicelle; fix gpu build errors (mac)
Jul 29, 2025
9bb7d2c
adaptive integration for most shape models
Jul 30, 2025
c6d9666
[pre-commit.ci lite] apply automatic fixes for ruff linting errors
pre-commit-ci-lite[bot] Jul 30, 2025
615df71
use sasmodels.compare -seed=<n> for reproducibile -sets
Jul 30, 2025
2be337b
Merge branch 'ticket-535-adaptive-integration' of github.com:SasView/…
Apr 8, 2026
40df890
improve accuracy of large triaxial ellipsoids
Apr 10, 2026
dea77dd
add missing lib/nonadaptive.c which is used for sasmodels.compare acc…
Apr 10, 2026
5881ff7
remove merge conflict
Apr 10, 2026
26a5f8d
improve accuracy of long rectangular prism models
Apr 13, 2026
da3b533
improve accuracy of long rectangular prism models
Apr 13, 2026
10c9f31
improve accuracy of elliptical cylinder model
Apr 13, 2026
8a49273
Tag gaussian integration variables n,z,w with _outer
Apr 13, 2026
6d0d448
improve accuracy of elliptical bicelle models
Apr 13, 2026
0899275
improve accuracy of barbell and capped cylinder
Apr 13, 2026
2766c1e
Tag gaussian integration variables n,z,w with _outer
Apr 14, 2026
962c0c0
compare sin(arccos(x)) to sqrt(1 - x**2)
Apr 15, 2026
d0b4310
add notes about gaussian cutoffs
Apr 15, 2026
86d9125
improve qr_max estimates for the pringle model
Apr 15, 2026
0db8e12
Merge branch 'master' into ticket-535-adaptive-integration
pkienzle Apr 15, 2026
1699cb9
Merge branch 'ticket-535-adaptive-integration' of github.com:SasView/…
Apr 15, 2026
504642b
math.h is included in kernel header; mac opencl complains when it is …
Apr 15, 2026
cf9fcaa
Merge branch 'master' into ticket-535-adaptive-integration
pkienzle Apr 28, 2026
848a9de
limit max evals for nested adaptive integration
May 11, 2026
cea2260
limit max evals for nested adaptive integration
May 11, 2026
9722271
limit max evals for nested adaptive integration
May 11, 2026
d567776
tweak sasmodels.compare docs
May 13, 2026
e810c2a
systematic check on precision of adaptive integration for all models
May 13, 2026
c3df432
limit max evales for nested adaptive integration: triaxial_ellipsoid
May 13, 2026
471192f
limit outer loop to 76 points for barbell, capped_cylinder and pringle
May 13, 2026
224ec5d
add gpu speed test
May 14, 2026
da52db6
fit latex data to sphere, ellipsoid or triaxial ellipsoid
May 14, 2026
5f82bca
Don't limit inner loop size for barbell/capped cylinder
May 14, 2026
81deff8
Limit size of outer loop to 500
May 14, 2026
02e6aff
improve timing comparison for adaptive integration checks
May 14, 2026
6b99d81
Limit size of outer loop to 500: bicelle elliptical belt rough
May 14, 2026
862931a
Merge master into ticket-535-adaptive-integration and fixes merge con…
krzywon May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 38 additions & 8 deletions example/simul_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,51 @@

# latex data, same sample usans and sans
# particles radius ~2300, uniform dispersity
datasets = load_data(str(data_path / '1d_data' / 'latex_smeared.xml'), index='all')
all_data = load_data(str(data_path / '1d_data' / 'latex_smeared.xml'), index='all')
#[print(data) for data in datasets]
datasets = all_data # Both SANS and USANS
#datasets = all_data[0:1] # SANS
#datasets = all_data[1:2] # USANS

# A single sphere model to share between the datasets. We will use
# A single model to share between the datasets. We will use
# FreeVariables below to set the parameters that are independent between
# the datasets.
kernel = load_model('sphere')
pars = dict(scale=0.01, background=0.0, sld=5.0, sld_solvent=0.0, radius=1500.,
#radius_pd=0.1, radius_pd_n=35,
)
model_name = "ellipsoid"
if model_name == "sphere":
kernel = load_model("sphere")
pars = dict(
scale=0.01, background=0.0, sld=5.0, sld_solvent=0.0, radius=1500.,
#radius_pd=0.1, radius_pd_n=35,
)
elif model_name == "ellipsoid":
kernel = load_model("ellipsoid")
pars = dict(
scale=0.01, background=0.0, sld=5.0, sld_solvent=0.0,
radius_polar=1500., radius_equatorial=1500.,
)
elif model_name == "triaxial_ellipsoid":
kernel = load_model("triaxial_ellipsoid", dtype="double!")
pars = dict(
scale=0.01, background=0.0, sld=5.0, sld_solvent=0.0,
radius_polar=1500., radius_equat_major=1500., radius_equat_minor=1500.,
)
else:
raise ValueError("Use model_name in sphere, ellipsoid, triaxial_ellipsoid")

model = Model(kernel, **pars)

# radius and polydispersity (if any) are shared
model.radius.range(0, 3000.)
#model.radius_pd.range(0, 1)
if model_name == "sphere":
model.radius.range(0, 3000.)
# model.radius_pd.range(0, 1)
elif model_name == "ellipsoid":
model.radius_equatorial.range(0, 3000.)
model.radius_polar.range(0, 3000.)
elif model_name == "triaxial_ellipsoid":
model.radius_equat_major.range(0, 3000.)
model.radius_equat_minor.range(0, 3000.)
model.radius_polar.range(0, 3000.)


# Contrast and dilution are the same for both measurements, but are not
# separable with a single measurement (i.e., I(q) ~ F(q) contrast^2 Vf),
Expand Down
Loading
Loading