sasmodels¶
Small angle X-ray and Neutron scattering (SAXS and SANS) examines the scattering patterns produced by a beam travelling through the sample and scattering at low angles. The scattering is computed as a function of reciprocal space \(q\), which arises from a combination of beam wavelength and scattering angles. Each pixel on the detector corresponds to a different scattering angle, and has a distinct \(q_x\) and \(q_y\). If the sample is unoriented, the scattering pattern will appear as rings on the detector. In this case, a circular average can be taken with 1-dimension data at \(q = \surd (q_x^2 + q_y^2)\) compared to the orientationally averaged SAS scattering pattern.
The sasmodels package provides theory functions for small angle scattering calculations for different shapes, including the effects of resolution, polydispersity and orientational dispersion.
- Release:
1.0.7
- Date:
Mar 28, 2024
Download pdf version here
- Sasmodels Guide
- 1. Introduction
- 2. Sasmodels Setup
- 3. Scripting Interface
- 4. GPU Setup
- 5. Theory
- 6. Polydispersity & Orientational Distributions
- 6.1. Calculation of I(q)
- 6.2. Suggested Applications
- 6.3. Usage Notes
- 6.4. Uniform Distribution
- 6.5. Rectangular Distribution
- 6.6. Gaussian Distribution
- 6.7. Boltzmann Distribution
- 6.8. Lognormal Distribution
- 6.9. Schulz Distribution
- 6.10. Array Distribution
- 6.11. User-defined Distributions
- 6.12. Note about DLS polydispersity
- 6.13. Related sections
- 7. Resolution (Smearing) Functions
- 8. Fitting Models with Structure Factors
- 9. Oriented Particles
- 10. Polarisation/Magnetic Scattering
- 11. Writing a Plugin Model
- 11.1. Overview
- 11.2. Create New Model Files
- 11.3. Edit New Model Files
- 11.3.1. Model Contents
- 11.3.2. Composite Models
- 11.3.3. Reparameterized Models
- 11.3.4. Model Documentation
- 11.3.5. Model Definition
- 11.3.6. Model Parameters
- 11.3.7. Model Computation
- 11.3.8. Python Models
- 11.3.9. Embedded C Models
- 11.3.10. Structure Factors
- 11.3.11. Oriented Shapes
- 11.3.12. Magnetism
- 11.3.13. Special Functions
- 11.3.14. Problems with C models
- 11.3.15. Form Factors
- 11.3.16. Unit Tests
- 11.4. Test Your New Model
- 11.5. Check The Docs
- 11.6. Clean Lint - (Developer Version Only)
- 11.7. Share Your Model!
- 12. SANS to SESANS conversion
- 13. Fitting SESANS Data from the Command Line
- 14. References
- Model Functions
- Cylinder Functions
- Ellipsoid Functions
- Lamellae Functions
- Paracrystal Functions
- Parallelepiped Functions
- Sphere Functions
- Shape-Independent Functions
- be_polyelectrolyte
- broad_peak
- correlation_length
- dab
- fractal
- fractal_core_shell
- gauss_lorentz_gel
- gaussian_peak
- gel_fit
- guinier
- guinier_porod
- line
- lorentz
- mass_fractal
- mass_surface_fractal
- mono_gauss_coil
- peak_lorentz
- poly_gauss_coil
- polymer_excl_volume
- porod
- power_law
- rpa
- spinodal
- star_polymer
- surface_fractal
- teubner_strey
- two_lorentzian
- two_power_law
- unified_power_Rg
- Structure Factors
- Sasmodels Developers Guide
- Reference
- 1. Sasmodels package
- 2. Bumps interface
- 3. Compare models on different compute engines
sasmodels.compare
Calculator
Explore
push_seed
build_math_context()
columnize()
compare()
constrain_pars()
delay()
explore()
get_pars()
isnumber()
limit_dimensions()
main()
make_data()
make_engine()
parameter_range()
parlist()
parse_opts()
parse_pars()
plot_models()
plot_profile()
print_models()
randomize_pars()
run_models()
set_beam_stop()
set_spherical_integration_parameters()
show_docs()
suppress_magnetism()
suppress_pd()
tic()
time_calculation()
MATH
- 4. Batch compare models on different compute engines
- 5. Model conversion table
- 6. Sasview to sasmodel converter
- 7. Load custom kernel modules
- 8. Model access
- 9. Data layout and plotting routines
- 10. Parameter packing for kernel calls
- 11. Simple interface
- 12. Annotate exceptions
- 13. Model parser
sasmodels.generate
contains_Fq()
contains_shell_volume()
convert_section_titles_to_boldface()
convert_type()
demo_time()
dll_timestamp()
find_xy_mode()
format_units()
get_data_path()
indent()
kernel_name()
load_kernel_module()
load_template()
main()
make_doc()
make_html()
make_partable()
make_source()
model_sources()
ocl_timestamp()
read_text()
set_integration_size()
tag_source()
test_tag_float()
view_html()
view_html_from_info()
- 14. Generate Gauss-Legendre integration points
- 15. Guyou map projection
- 16. Orientation explorer
sasmodels.jitter
- Jitter Explorer
Quaternion
PLOT_ENGINE()
R_to_xyz()
Rx()
Ry()
Rz()
apply_jitter()
build_model()
clipped_range()
draw_axes()
draw_bcc()
draw_beam()
draw_box()
draw_ellipsoid()
draw_fcc()
draw_jitter()
draw_labels()
draw_mesh()
draw_parallelepiped()
draw_person_on_sphere()
draw_sc()
draw_scattering()
draw_sphere()
get_projection()
ipv_axes()
main()
make_image()
make_vec()
map_colors()
orient_relative_to_beam()
orient_relative_to_beam_quaternion()
run()
select_calculator()
set_plotter()
test_qrot()
transform_xyz()
- 17. Evaluator type definitions
- 18. OpenCL model evaluator
- 19. CUDA model evaluator
- 20. Ctypes model evaluator
- 21. Python model evaluator
- 22. Identify all parameters in all models
- 23. Mixture model evaluator
- 24. Unit test support
- 25. Parameter and model definitions
- 26. Multiple scattering support
- 27. Product model evaluator
- 28. 1-D resolution functions
- 29. 2-D resolution functions
- 30. Convert doc strings the web pages
- 31. Sasview interface
sasmodels.sasview_model
MultiplicityInfo
MultiplicityInfoType
SasviewModel
MultiplicationModel()
find_model()
load_custom_model()
load_standard_models()
magnetic_demo()
make_model_from_info()
reset_environment()
test_cylinder()
test_empty_distribution()
test_model_list()
test_old_name()
test_product()
test_rpa()
test_structure_factor()
test_structure_factor_background()
MODELS
MODEL_BY_PATH
SUPPORT_OLD_STYLE_PLUGINS
- 32. SESANS calculation routines
- 33. Special functions library
- 34. Distribution functions