Changes in / [4cdc4b1:c9fc873] in sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/guide/pd/polydispersity.rst
rd712a0f r29afc50 20 20 P(q) = \text{scale} \langle F^* F \rangle / V + \text{background} 21 21 22 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 23 average over the size distribution $f(x; \bar x, \sigma)$, giving 24 25 .. math:: 26 27 P(q) = \frac{\text{scale}}{V} \int_\mathbb{R} 28 f(x; \bar x, \sigma) F^2(q, x)\, dx + \text{background} 22 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an 23 average over the size distribution. 29 24 30 25 Each distribution is characterized by a center value $\bar x$ or … … 46 41 with larger values of $N_\sigma$ required for heavier tailed distributions. 47 42 The scattering in general falls rapidly with $qr$ so the usual assumption 48 that $ f(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)f(r - 3\sigma_r)$43 that $G(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)G(r - 3\sigma_r)$ 49 44 will not contribute much to the average may not hold when particles are large. 50 45 This, too, will require increasing $N_\sigma$. … … 68 63 69 64 Additional distributions are under consideration. 70 71 .. note:: In 2009 IUPAC decided to introduce the new term 'dispersity' to replace72 the term 'polydispersity' (see `Pure Appl. Chem., (2009), 81(2),73 351-353 <http://media.iupac.org/publications/pac/2009/pdf/8102x0351.pdf>`_74 in order to make the terminology describing distributions of properties75 unambiguous. Throughout the SasView documentation we continue to use the76 term polydispersity because one of the consequences of the IUPAC change is77 that orientational polydispersity would not meet their new criteria (which78 requires dispersity to be dimensionless).79 65 80 66 Suggested Applications -
sasmodels/compare.py
r1e7b202a r65fbf7c 107 107 -title="note" adds note to the plot title, after the model name 108 108 -weights shows weights plots for the polydisperse parameters 109 -profile shows the sld profile if the model has a plottable sld profile110 109 111 110 === output options === … … 776 775 dim = base._kernel.dim 777 776 plot_weights(model_info, get_mesh(model_info, base_pars, dim=dim)) 778 if opts['show_profile']:779 import pylab780 base, comp = opts['engines']781 base_pars, comp_pars = opts['pars']782 have_base = base._kernel.info.profile is not None783 have_comp = (784 comp is not None785 and comp._kernel.info.profile is not None786 and base_pars != comp_pars787 )788 if have_base or have_comp:789 pylab.figure()790 if have_base:791 plot_profile(base._kernel.info, **base_pars)792 if have_comp:793 plot_profile(comp._kernel.info, label='comp', **comp_pars)794 pylab.legend()795 777 if opts['plot']: 796 778 import matplotlib.pyplot as plt 797 779 plt.show() 798 780 return limits 799 800 def plot_profile(model_info, label='base', **args):801 # type: (ModelInfo, List[Tuple[float, np.ndarray, np.ndarray]]) -> None802 """803 Plot the profile returned by the model profile method.804 805 *model_info* defines model parameters, etc.806 807 *mesh* is a list of tuples containing (*value*, *dispersity*, *weights*)808 for each parameter, where (*dispersity*, *weights*) pairs are the809 distributions to be plotted.810 """811 import pylab812 813 args = dict((k, v) for k, v in args.items()814 if "_pd" not in k815 and ":" not in k816 and k not in ("background", "scale", "theta", "phi", "psi"))817 args = args.copy()818 819 args.pop('scale', 1.)820 args.pop('background', 0.)821 z, rho = model_info.profile(**args)822 #pylab.interactive(True)823 pylab.plot(z, rho, '-', label=label)824 pylab.grid(True)825 #pylab.show()826 827 828 781 829 782 def run_models(opts, verbose=False): … … 996 949 OPTIONS = [ 997 950 # Plotting 998 'plot', 'noplot', 999 'weights', 'profile', 951 'plot', 'noplot', 'weights', 1000 952 'linear', 'log', 'q4', 1001 953 'rel', 'abs', … … 1151 1103 'count' : '1', 1152 1104 'show_weights' : False, 1153 'show_profile' : False,1154 1105 'sphere' : 0, 1155 1106 'ngauss' : '0', … … 1212 1163 elif arg == '-default': opts['use_demo'] = False 1213 1164 elif arg == '-weights': opts['show_weights'] = True 1214 elif arg == '-profile': opts['show_profile'] = True1215 1165 elif arg == '-html': opts['html'] = True 1216 1166 elif arg == '-help': opts['html'] = True -
sasmodels/models/core_shell_sphere.py
rdc76240 r2d81cfe 21 21 .. math:: 22 22 23 F (q) = \frac{3}{V_s}\left[23 F^2(q) = \frac{3}{V_s}\left[ 24 24 V_c(\rho_c-\rho_s)\frac{\sin(qr_c)-qr_c\cos(qr_c)}{(qr_c)^3} + 25 25 V_s(\rho_s-\rho_\text{solv})\frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3}
Note: See TracChangeset
for help on using the changeset viewer.