source: sasview/src/sas/models/media/olddocs/model_functions.rst @ d63cf11

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since d63cf11 was d63cf11, checked in by krzywon, 8 years ago

Restoring the sas.models.media folder for sphinx build purposes.

  • Property mode set to 100644
File size: 169.1 KB
RevLine 
[d63cf11]1.. model_functions.rst
2
3.. This is a port of the original SasView model_functions.html to ReSTructured text
4.. by S King, ISIS, during and after SasView CodeCamp-II in April 2014.
5
6.. Thanks are due to A Jackson & P Kienzle for advice on RST!
7
8.. The CoreShellEllipsoidXTModel was ported and documented by R K Heenan, ISIS, Apr 2014
9.. The RectangularPrism models were coded and documented by M A Gonzalez, ILL, Apr 2014
10
11.. To do:
12.. Add example parameters/plots for the CoreShellEllipsoidXTModel
13.. Add example parameters/plots for the RectangularPrism models
14.. Check the content against the NIST Igor Help File
15.. Wordsmith the content for consistency of style, etc
16
17
18
19.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
20
21
22.. note::  The contents of this document are presented in good faith and are
23           believed to be mostly correct and accurate, however they have not
24           yet been rigorously checked for errors. June2015
25
26
27.. Set up some substitutions to make life easier...
28
29.. |alpha| unicode:: U+03B1
30.. |beta| unicode:: U+03B2
31.. |gamma| unicode:: U+03B3
32.. |delta| unicode:: U+03B4
33.. |epsilon| unicode:: U+03B5
34.. |zeta| unicode:: U+03B6
35.. |eta| unicode:: U+03B7
36.. |theta| unicode:: U+03B8
37.. |iota| unicode:: U+03B9
38.. |kappa| unicode:: U+03BA
39.. |lambda| unicode:: U+03BB
40.. |mu| unicode:: U+03BC
41.. |nu| unicode:: U+03BD
42.. |xi| unicode:: U+03BE
43.. |omicron| unicode:: U+03BF
44.. |pi| unicode:: U+03C0
45.. |rho| unicode:: U+03C1
46.. |sigma| unicode:: U+03C3
47.. |tau| unicode:: U+03C4
48.. |upsilon| unicode:: U+03C5
49.. |phi| unicode:: U+03C6
50.. |chi| unicode:: U+03C7
51.. |psi| unicode:: U+03C8
52.. |omega| unicode:: U+03C9
53.. |biggamma| unicode:: U+0393
54.. |bigdelta| unicode:: U+0394
55.. |bigzeta| unicode:: U+039E
56.. |bigpsi| unicode:: U+03A8
57.. |drho| replace:: |bigdelta|\ |rho|
58.. |Ang| unicode:: U+212B
59.. |Ang^-1| replace:: |Ang|\ :sup:`-1`
60.. |Ang^2| replace:: |Ang|\ :sup:`2`
61.. |Ang^-2| replace:: |Ang|\ :sup:`-2`
62.. |Ang^3| replace:: |Ang|\ :sup:`3`
63.. |Ang^-3| replace:: |Ang|\ :sup:`-3`
64.. |Ang^-4| replace:: |Ang|\ :sup:`-4`
65.. |cm^-1| replace:: cm\ :sup:`-1`
66.. |cm^2| replace:: cm\ :sup:`2`
67.. |cm^-2| replace:: cm\ :sup:`-2`
68.. |cm^3| replace:: cm\ :sup:`3`
69.. |cm^-3| replace:: cm\ :sup:`-3`
70.. |sr^-1| replace:: sr\ :sup:`-1`
71.. |P0| replace:: P\ :sub:`0`\
72.. |A2| replace:: A\ :sub:`2`\
73
74
75
76.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
77
78
79
80.. Actual document starts here...
81
82.. _SasView_model_functions:
83
84SasView Model Functions
85=======================
86
87.. _Background:
88
891. Background
90---------------
91
92Many of our models use the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
93Research and thus some content and figures in this document are originated from or shared with the NIST SANS Igor-based
94analysis package.
95
96This software provides form factors for various particle shapes. After giving a mathematical definition of each model,
97we show the list of parameters available to the user. Validation plots for each model are also presented.
98
99Instructions on how to use SasView itself are available separately.
100
101To easily compare to the scattering intensity measured in experiments, we normalize the form factors by the volume of
102the particle
103
104.. image:: ..\img\olddocs\image001.PNG
105
106with
107
108.. image:: ..\img\olddocs\image002.PNG
109
110where |P0|\ *(q)* is the un-normalized form factor, |rho|\ *(r)* is the scattering length density at a given
111point in space and the integration is done over the volume *V* of the scatterer.
112
113For systems without inter-particle interference, the form factors we provide can be related to the scattering intensity
114by the particle volume fraction
115
116.. image:: ..\img\olddocs\image003.PNG
117
118Our so-called 1D scattering intensity functions provide *P(q)* for the case where the scatterer is randomly oriented. In
119that case, the scattering intensity only depends on the length of *q* . The intensity measured on the plane of the SAS
120detector will have an azimuthal symmetry around *q*\ =0 .
121
122Our so-called 2D scattering intensity functions provide *P(q,* |phi| *)* for an oriented system as a function of a
123q-vector in the plane of the detector. We define the angle |phi| as the angle between the q vector and the horizontal
124(x) axis of the plane of the detector.
125
126For information about polarised and magnetic scattering, click here_.
127
128.. _here: polar_mag_help.html
129
130
131
132.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
133
134
135
136.. _Model:
137
1382. Model functions
139------------------
140
141.. _Shape-based:
142
1432.1 Shape-based Functions
144-------------------------
145
146Sphere-based
147------------
148
149- SphereModel_ (including magnetic 2D version)
150- BinaryHSModel_
151- FuzzySphereModel_
152- RaspBerryModel_
153- CoreShellModel_ (including magnetic 2D version)
154- MicelleSphCoreModel_
155- CoreMultiShellModel_ (including magnetic 2D version)
156- Core2ndMomentModel_
157- MultiShellModel_
158- OnionExpShellModel_
159- VesicleModel_
160- SphericalSLDModel_
161- LinearPearlsModel_
162- PearlNecklaceModel_
163
164Cylinder-based
165--------------
166
167- CylinderModel_ (including magnetic 2D version)
168- HollowCylinderModel_
169- CappedCylinderModel_
170- CoreShellCylinderModel_
171- EllipticalCylinderModel_
172- FlexibleCylinderModel_
173- FlexCylEllipXModel_
174- CoreShellBicelleModel_
175- BarBellModel_
176- StackedDisksModel_
177- PringleModel_
178
179Ellipsoid-based
180---------------
181
182- EllipsoidModel_
183- CoreShellEllipsoidModel_
184- CoreShellEllipsoidXTModel_
185- TriaxialEllipsoidModel_
186
187Lamellae
188--------
189
190- LamellarModel_
191- LamellarFFHGModel_
192- LamellarPSModel_
193- LamellarPSHGModel_
194
195Paracrystals
196------------
197
198- LamellarPCrystalModel_
199- SCCrystalModel_
200- FCCrystalModel_
201- BCCrystalModel_
202
203Parallelpipeds
204--------------
205
206- ParallelepipedModel_ (including magnetic 2D version)
207- CSParallelepipedModel_
208- RectangularPrismModel_
209- RectangularHollowPrismModel_
210- RectangularHollowPrismInfThinWallsModel_
211
212.. _Shape-independent:
213
2142.2 Shape-Independent Functions
215-------------------------------
216
217(In alphabetical order)
218
219- AbsolutePower_Law_
220- BEPolyelectrolyte_
221- BroadPeakModel_
222- CorrLength_
223- DABModel_
224- Debye_
225- FractalModel_
226- FractalCoreShell_
227- GaussLorentzGel_
228- GelFitModel_
229- Guinier_
230- GuinierPorod_
231- LineModel_
232- Lorentz_
233- MassFractalModel_
234- MassSurfaceFractal_
235- PeakGaussModel_
236- PeakLorentzModel_
237- Poly_GaussCoil_
238- PolyExclVolume_
239- PorodModel_
240- RPA10Model_
241- StarPolymer_
242- SurfaceFractalModel_
243- TeubnerStrey_
244- TwoLorentzian_
245- TwoPowerLaw_
246- UnifiedPowerRg_
247- ReflectivityModel_
248- ReflectivityIIModel_
249
250.. _Structure-factor:
251
2522.3 Structure Factor Functions
253------------------------------
254
255- HardSphereStructure_
256- SquareWellStructure_
257- HayterMSAStructure_
258- StickyHSStructure_
259
260.. _Customised:
261
2622.4 Customized Functions
263------------------------
264
265- testmodel_
266- testmodel_2_
267- sum_p1_p2_
268- sum_Ap1_1_Ap2_
269- polynomial5_
270- sph_bessel_jn_
271
272Also see the documentation on :ref:`Adding_your_own_models` under Fitting Data.
273
274
275
276.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
277
278
279
280.. _References:
281
2823. References
283-------------
284
285*Small-Angle Scattering of X-Rays*
286A Guinier and G Fournet
287John Wiley & Sons, New York (1955)
288
289P Stckel, R May, I Strell, Z Cejka, W Hoppe, H Heumann, W Zillig and H Crespi
290*Eur. J. Biochem.*, 112, (1980), 411-417
291
292G Porod
293in *Small Angle X-ray Scattering*
294(editors) O Glatter and O Kratky
295Academic Press (1982)
296
297*Structure Analysis by Small-Angle X-Ray and Neutron Scattering*
298L.A Feigin and D I Svergun
299Plenum Press, New York (1987)
300
301S Hansen
302*J. Appl. Cryst.* 23, (1990), 344-346
303
304S J Henderson
305*Biophys. J.* 70, (1996), 1618-1627
306
307B C McAlister and B P Grady
308*J. Appl. Cryst.* 31, (1998), 594-599
309
310S R Kline
311*J Appl. Cryst.* 39(6), (2006), 895
312
313**Also see the references at the end of the each model function descriptions.**
314
315
316
317.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
318
319
320
321Model Definitions
322-----------------
323
324.. _SphereModel:
325
326**2.1.1. SphereModel**
327
328This model provides the form factor, *P(q)*, for a monodisperse spherical particle with uniform scattering length
329density. The form factor is normalized by the particle volume as described below.
330
331For information about polarised and magnetic scattering, click here_.
332
333.. _here: polar_mag_help.html
334
335*2.1.1.1. Definition*
336
337The 1D scattering intensity is calculated in the following way (Guinier, 1955)
338
339.. image:: ..\img\olddocs\image004.PNG
340
341where *scale* is a volume fraction, *V* is the volume of the scatterer, *r* is the radius of the sphere, *bkg* is
342the background level and *sldXXX* is the scattering length density (SLD) of the scatterer or the solvent.
343
344Note that if your data is in absolute scale, the *scale* should represent the volume fraction (which is unitless) if
345you have a good fit. If not, it should represent the volume fraction \* a factor (by which your data might need to be
346rescaled).
347
348The 2D scattering intensity is the same as above, regardless of the orientation of the q vector.
349
350The returned value is scaled to units of |cm^-1| and the parameters of the SphereModel are the following:
351
352==============  ========  =============
353Parameter name  Units     Default value
354==============  ========  =============
355scale           None      1
356radius          |Ang|     60
357sldSph          |Ang^-2|  2.0e-6
358sldSolv         |Ang^-2|  1.0e-6
359background      |cm^-1|   0
360==============  ========  =============
361
362Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
363Research (Kline, 2006).
364
365REFERENCE
366
367A Guinier and G. Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955)
368
369*2.1.1.2. Validation of the SphereModel*
370
371Validation of our code was done by comparing the output of the 1D model to the output of the software provided by the
372NIST (Kline, 2006). Figure 1 shows a comparison of the output of our model and the output of the NIST software.
373
374.. image:: ..\img\olddocs\image005.jpg
375
376Figure 1: Comparison of the DANSE scattering intensity for a sphere with the output of the NIST SANS analysis software.
377The parameters were set to: Scale=1.0, Radius=60 |Ang|, Contrast=1e-6 |Ang^-2|, and Background=0.01 |cm^-1|.
378
379*2013/09/09 and 2014/01/06 - Description reviewed by S King and P Parker.*
380
381
382
383.. _BinaryHSModel:
384
385**2.1.2. BinaryHSModel**
386
387*2.1.2.1. Definition*
388
389This model (binary hard sphere model) provides the scattering intensity, for binary mixture of spheres including hard
390sphere interaction between those particles. Using Percus-Yevick closure, the calculation is an exact multi-component
391solution
392
393.. image:: ..\img\olddocs\image006.PNG
394
395where *Sij* are the partial structure factors and *fi* are the scattering amplitudes of the particles. The subscript 1
396is for the smaller particle and 2 is for the larger. The number fraction of the larger particle, (*x* = n2/(n1+n2),
397where *n* = the number density) is internally calculated based on
398
399.. image:: ..\img\olddocs\image007.PNG
400
401The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
402
403.. image:: ..\img\olddocs\image008.PNG
404
405The parameters of the BinaryHSModel are the following (in the names, *l* (or *ls*\ ) stands for larger spheres
406while *s* (or *ss*\ ) for the smaller spheres).
407
408==============  ========  =============
409Parameter name  Units     Default value
410==============  ========  =============
411background      |cm^-1|   0.001
412l_radius        |Ang|     100.0
413ss_sld          |Ang^-2|  0.0
414ls_sld          |Ang^-2|  3e-6
415solvent_sld     |Ang^-2|  6e-6
416s_radius        |Ang|     25.0
417vol_frac_ls     None      0.1
418vol_frac_ss     None      0.2
419==============  ========  =============
420
421.. image:: ..\img\olddocs\image009.jpg
422
423*Figure. 1D plot using the default values above (w/200 data point).*
424
425Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
426Research (Kline, 2006).
427
428See the reference for details.
429
430REFERENCE
431
432N W Ashcroft and D C Langreth, *Physical Review*, 156 (1967) 685-692
433[Errata found in *Phys. Rev.* 166 (1968) 934]
434
435
436
437.. _FuzzySphereModel:
438
439**2.1.3. FuzzySphereModel**
440
441This model is to calculate the scattering from spherical particles with a "fuzzy" interface.
442
443*2.1.3.1. Definition*
444
445The scattering intensity *I(q)* is calculated as:
446
447.. image:: ..\img\olddocs\image010.PNG
448
449where the amplitude *A(q)* is given as the typical sphere scattering convoluted with a Gaussian to get a gradual
450drop-off in the scattering length density
451
452.. image:: ..\img\olddocs\image011.PNG
453
454Here |A2|\ *(q)* is the form factor, *P(q)*. The scale is equivalent to the volume fraction of spheres, each of
455volume, *V*\. Contrast (|drho|) is the difference of scattering length densities of the sphere and the surrounding
456solvent.
457
458Poly-dispersion in radius and in fuzziness is provided for.
459
460The returned value is scaled to units of |cm^-1|\ |sr^-1|; ie, absolute scale.
461
462From the reference
463
464  The "fuzziness" of the interface is defined by the parameter |sigma| :sub:`fuzzy`\ . The particle radius *R*
465  represents the radius of the particle where the scattering length density profile decreased to 1/2 of the core
466  density. The |sigma| :sub:`fuzzy`\ is the width of the smeared particle surface; i.e., the standard deviation
467  from the average height of the fuzzy interface. The inner regions of the microgel that display a higher density
468  are described by the radial box profile extending to a radius of approximately *Rbox* ~ *R* - 2\ |sigma|\ . The
469  profile approaches zero as *Rsans* ~ *R* + 2\ |sigma|\ .
470
471For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
472
473.. image:: ..\img\olddocs\image008.PNG
474
475This example dataset is produced by running the FuzzySphereModel, using 200 data points, *qmin* = 0.001 -1,
476*qmax* = 0.7 |Ang^-1| and the default values
477
478==============  ========  =============
479Parameter name  Units     Default value
480==============  ========  =============
481scale           None      1.0
482radius          |Ang|     60
483fuzziness       |Ang|     10
484sldSolv         |Ang^-2|  3e-6
485sldSph          |Ang^-2|  1e-6
486background      |cm^-1|   0.001
487==============  ========  =============
488
489.. image:: ..\img\olddocs\image012.jpg
490
491*Figure. 1D plot using the default values (w/200 data point).*
492
493REFERENCE
494
495M Stieger, J. S Pedersen, P Lindner, W Richtering, *Langmuir*, 20 (2004) 7283-7292
496
497
498
499.. _RaspBerryModel:
500
501**2.1.4. RaspBerryModel**
502
503Calculates the form factor, *P(q)*, for a "Raspberry-like" structure where there are smaller spheres at the surface
504of a larger sphere, such as the structure of a Pickering emulsion.
505
506*2.1.4.1. Definition*
507
508The structure is:
509
510.. image:: ..\img\olddocs\raspberry_pic.jpg
511
512where *Ro* = the radius of the large sphere, *Rp* = the radius of the smaller sphere on the surface, |delta| = the
513fractional penetration depth, and surface coverage = fractional coverage of the large sphere surface (0.9 max).
514
515The large and small spheres have their own SLD, as well as the solvent. The surface coverage term is a fractional
516coverage (maximum of approximately 0.9 for hexagonally-packed spheres on a surface). Since not all of the small
517spheres are necessarily attached to the surface, the excess free (small) spheres scattering is also included in the
518calculation. The function calculated follows equations (8)-(12) of the reference below, and the equations are not
519reproduced here.
520
521The returned value is scaled to units of |cm^-1|. No inter-particle scattering is included in this model.
522
523For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
524
525.. image:: ..\img\olddocs\image008.PNG
526
527This example dataset is produced by running the RaspBerryModel, using 2000 data points, *qmin* = 0.0001 |Ang^-1|,
528*qmax* = 0.2 |Ang^-1| and the default values below, where *Ssph/Lsph* stands for smaller or larger sphere, respectively,
529and *surfrac_Ssph* is the surface fraction of the smaller spheres.
530
531==============  ========  =============
532Parameter name  Units     Default value
533==============  ========  =============
534delta_Ssph      None      0
535radius_Lsph     |Ang|     5000
536radius_Ssph     |Ang|     100
537sld_Lsph        |Ang^-2|  -4e-07
538sld_Ssph        |Ang^-2|  3.5e-6
539sld_solv        |Ang^-2|  6.3e-6
540surfrac_Ssph    None      0.4
541volf_Lsph       None      0.05
542volf_Lsph       None      0.005
543background      |cm^-1|   0
544==============  ========  =============
545
546.. image:: ..\img\olddocs\raspberry_plot.jpg
547
548*Figure. 1D plot using the values of /2000 data points.*
549
550REFERENCE
551
552K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for Pickering emulsions and raspberry*
553*particles*, *Journal of Colloid and Interface Science*, 343(1) (2010) 36-41
554
555
556
557.. _CoreShellModel:
558
559**2.1.5. CoreShellModel**
560
561This model provides the form factor, *P(q)*, for a spherical particle with a core-shell structure. The form factor is
562normalized by the particle volume.
563
564For information about polarised and magnetic scattering, click here_.
565
566*2.1.5.1. Definition*
567
568The 1D scattering intensity is calculated in the following way (Guinier, 1955)
569
570.. image:: ..\img\olddocs\image013.PNG
571
572where *scale* is a scale factor, *Vs* is the volume of the outer shell, *Vc* is the volume of the core, *rs* is the
573radius of the shell, *rc* is the radius of the core, *c* is the scattering length density of the core, *s* is the
574scattering length density of the shell, *solv* is the scattering length density of the solvent, and *bkg* is the
575background level.
576
577The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector.
578
579NB: The outer most radius (ie, = *radius* + *thickness*) is used as the effective radius for *S(Q)* when
580*P(Q)* \* *S(Q)* is applied.
581
582The returned value is scaled to units of |cm^-1| and the parameters of the CoreShellModel are the following
583
584==============  ========  =============
585Parameter name  Units     Default value
586==============  ========  =============
587scale           None      1.0
588(core) radius   |Ang|     60
589thickness       |Ang|     10
590core_sld        |Ang^-2|  1e-6
591shell_sld       |Ang^-2|  2e-6
592solvent_sld     |Ang^-2|  3e-6
593background      |cm^-1|   0.001
594==============  ========  =============
595
596Here, *radius* = the radius of the core and *thickness* = the thickness of the shell.
597
598Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
599Research (Kline, 2006).
600
601REFERENCE
602
603A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955)
604
605*2.1.5.2. Validation of the core-shell sphere model*
606
607Validation of our code was done by comparing the output of the 1D model to the output of the software provided by
608NIST (Kline, 2006). Figure 1 shows a comparison of the output of our model and the output of the NIST software.
609
610.. image:: ..\img\olddocs\image014.jpg
611
612Figure 1: Comparison of the SasView scattering intensity for a core-shell sphere with the output of the NIST SANS
613analysis software. The parameters were set to: *Scale* = 1.0, *Radius* = 60 , *Contrast* = 1e-6 |Ang^-2|, and
614*Background* = 0.001 |cm^-1|.
615
616
617
618.. _CoreMultiShellModel:
619
620**2.1.6. CoreMultiShellModel**
621
622This model provides the scattering from a spherical core with 1 to 4 concentric shell structures. The SLDs of the core
623and each shell are individually specified.
624
625For information about polarised and magnetic scattering, click here_.
626
627*2.1.6.1. Definition*
628
629This model is a trivial extension of the CoreShell function to a larger number of shells. See the CoreShell function
630for a diagram and documentation.
631
632The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
633
634Be careful! The SLDs and scale can be highly correlated. Hold as many of these parameters fixed as possible.
635
636The 2D scattering intensity is the same as P(q) of 1D, regardless of the orientation of the q vector.
637
638NB: The outer most radius (ie, = *radius* + 4 *thicknesses*) is used as the effective radius for *S(Q)* when
639*P(Q)* \* *S(Q)* is applied.
640
641The returned value is scaled to units of |cm^-1| and the parameters of the CoreMultiShell model are the following
642
643==============  ========  =============
644Parameter name  Units     Default value
645==============  ========  =============
646scale           None      1.0
647rad_core        |Ang|     60
648sld_core        |Ang^-2|  6.4e-6
649sld_shell1      |Ang^-2|  1e-6
650sld_shell2      |Ang^-2|  2e-6
651sld_shell3      |Ang^-2|  3e-6
652sld_shell4      |Ang^-2|  4e-6
653sld_solv        |Ang^-2|  6.4e-6
654thick_shell1    |Ang|     10
655thick_shell2    |Ang|     10
656thick_shell3    |Ang|     10
657thick_shell4    |Ang|     10
658background      |cm^-1|   0.001
659==============  ========  =============
660
661NB: Here, *rad_core* = the radius of the core, *thick_shelli* = the thickness of the shell *i* and
662*sld_shelli* = the SLD of the shell *i*. *sld_core* and the *sld_solv* are the SLD of the core and the solvent,
663respectively.
664
665Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
666Research (Kline, 2006).
667
668This example dataset is produced by running the CoreMultiShellModel using 200 data points, *qmin* = 0.001 -1,
669*qmax* = 0.7 -1 and the above default values.
670
671.. image:: ..\img\olddocs\image015.jpg
672
673*Figure: 1D plot using the default values (w/200 data point).*
674
675The scattering length density profile for the default sld values (w/ 4 shells).
676
677.. image:: ..\img\olddocs\image016.jpg
678
679*Figure: SLD profile against the radius of the sphere for default SLDs.*
680
681REFERENCE
682
683See the CoreShellModel_ documentation.
684
685
686
687.. _Core2ndMomentModel:
688
689**2.1.7. Core2ndMomentModel**
690
691This model describes the scattering from a layer of surfactant or polymer adsorbed on spherical particles under the
692conditions that (i) the particles (cores) are contrast-matched to the dispersion medium, (ii) *S(Q)* ~ 1 (ie, the
693particle volume fraction is dilute), (iii) the particle radius is >> layer thickness (ie, the interface is locally
694flat), and (iv) scattering from excess unadsorbed adsorbate in the bulk medium is absent or has been corrected for.
695
696Unlike a core-shell model, this model does not assume any form for the density distribution of the adsorbed species
697normal to the interface (cf, a core-shell model which assumes the density distribution to be a homogeneous
698step-function). For comparison, if the thickness of a (core-shell like) step function distribution is *t*, the second
699moment, |sigma| = sqrt((*t* :sup:`2` )/12). The |sigma| is the second moment about the mean of the density distribution
700(ie, the distance of the centre-of-mass of the distribution from the interface).
701
702*2.1.7.1. Definition*
703
704The *I* :sub:`0` is calculated in the following way (King, 2002)
705
706.. image:: ..\img\olddocs\secondmeq1.jpg
707
708where *scale* is a scale factor, *poly* is the sld of the polymer (or surfactant) layer, *solv* is the sld of the
709solvent/medium and cores, |phi|\ :sub:`cores` is the volume fraction of the core paraticles, and |biggamma| and
710|delta| are the adsorbed amount and the bulk density of the polymers respectively. The |sigma| is the second moment
711of the thickness distribution.
712
713Note that all parameters except the |sigma| are correlated for fitting so that fitting those with more than one
714parameter will generally fail. Also note that unlike other shape models, no volume normalization is applied to this
715model (the calculation is exact).
716
717The returned value is scaled to units of |cm^-1| and the parameters are the following
718
719==============  ========  =============
720Parameter name  Units     Default value
721==============  ========  =============
722scale           None      1.0
723density_poly    g/cm2     0.7
724radius_core     |Ang|     500
725ads_amount      mg/m 2    1.9
726second_moment   |Ang|     23.0
727volf_cores      None      0.14
728sld_poly        |Ang^-2|  1.5e-6
729sld_solv        |Ang^-2|  6.3e-6
730background      |cm^-1|   0.0
731==============  ========  =============
732
733.. image:: ..\img\olddocs\secongm_fig1.jpg
734
735REFERENCE
736
737S King, P Griffiths, J. Hone, and T Cosgrove, *SANS from Adsorbed Polymer Layers*,
738*Macromol. Symp.*, 190 (2002) 33-42
739
740
741
742.. _MultiShellModel:
743
744**2.1.8. MultiShellModel**
745
746This model provides the form factor, *P(q)*, for a multi-lamellar vesicle with *N* shells where the core is filled with
747solvent and the shells are interleaved with layers of solvent. For *N* = 1, this returns the VesicleModel (above).
748
749.. image:: ..\img\olddocs\image020.jpg
750
751The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
752
753.. image:: ..\img\olddocs\image008.PNG
754
755NB: The outer most radius (= *core_radius* + *n_pairs* \* *s_thickness* + (*n_pairs* - 1) \* *w_thickness*) is used
756as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
757
758The returned value is scaled to units of |cm^-1| and the parameters of the MultiShellModel are the following
759
760==============  ========  =============
761Parameter name  Units     Default value
762==============  ========  =============
763scale           None      1.0
764core_radius     |Ang|     60.0
765n_pairs         None      2.0
766core_sld        |Ang^-2|  6.3e-6
767shell_sld       |Ang^-2|  0.0
768background      |cm^-1|   0.0
769s_thickness     |Ang|     10
770w_thickness     |Ang|     10
771==============  ========  =============
772
773NB: *s_thickness* is the shell thickness while the *w_thickness* is the solvent thickness, and *n_pair*
774is the number of shells.
775
776.. image:: ..\img\olddocs\image021.jpg
777
778*Figure. 1D plot using the default values (w/200 data point).*
779
780Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron
781Research (Kline, 2006).
782
783REFERENCE
784
785B Cabane, *Small Angle Scattering Methods*, in *Surfactant Solutions: New Methods of Investigation*, Ch.2,
786Surfactant Science Series Vol. 22, Ed. R Zana and M Dekker, New York, (1987).
787
788
789
790.. _OnionExpShellModel:
791
792**2.1.9. OnionExpShellModel**
793
794This model provides the form factor, *P(q)*, for a multi-shell sphere where the scattering length density (SLD) of the
795each shell is described by an exponential (linear, or flat-top) function. The form factor is normalized by the volume
796of the sphere where the SLD is not identical to the SLD of the solvent. We currently provide up to 9 shells with this
797model.
798
799*2.1.9.1. Definition*
800
801The 1D scattering intensity is calculated in the following way
802
803.. image:: ..\img\olddocs\image022.gif
804
805.. image:: ..\img\olddocs\image023.gif
806
807where, for a spherically symmetric particle with a particle density |rho|\ *(r)*
808
809.. image:: ..\img\olddocs\image024.gif
810
811so that
812
813.. image:: ..\img\olddocs\image025.gif
814
815.. image:: ..\img\olddocs\image026.gif
816
817.. image:: ..\img\olddocs\image027.gif
818
819Here we assumed that the SLDs of the core and solvent are constant against *r*.
820
821Now lets consider the SLD of a shell, *r*\ :sub:`shelli`, defined by
822
823.. image:: ..\img\olddocs\image028.gif
824
825An example of a possible SLD profile is shown below where *sld_in_shelli* (|rho|\ :sub:`in`\ ) and
826*thick_shelli* (|bigdelta|\ *t* :sub:`shelli`\ ) stand for the SLD of the inner side of the *i*\ th shell and the
827thickness of the *i*\ th shell in the equation above, respectively.
828
829For \| *A* \| > 0,
830
831.. image:: ..\img\olddocs\image029.gif
832
833For *A* ~ 0 (eg., *A* = -0.0001), this function converges to that of the linear SLD profile (ie,
834|rho|\ :sub:`shelli`\ *(r)* = *A*\ :sup:`'` ( *r* - *r*\ :sub:`shelli` - 1) / |bigdelta|\ *t* :sub:`shelli`) + *B*\ :sup:`'`),
835so this case is equivalent to
836
837.. image:: ..\img\olddocs\image030.gif
838
839.. image:: ..\img\olddocs\image031.gif
840
841.. image:: ..\img\olddocs\image032.gif
842
843.. image:: ..\img\olddocs\image033.gif
844
845For *A* = 0, the exponential function has no dependence on the radius (so that *sld_out_shell* (|rho|\ :sub:`out`) is
846ignored this case) and becomes flat. We set the constant to |rho|\ :sub:`in` for convenience, and thus the form
847factor contributed by the shells is
848
849.. image:: ..\img\olddocs\image034.gif
850
851.. image:: ..\img\olddocs\image035.gif
852
853In the equation
854
855.. image:: ..\img\olddocs\image036.gif
856
857Finally, the form factor can be calculated by
858
859.. image:: ..\img\olddocs\image037.gif
860
861where
862
863.. image:: ..\img\olddocs\image038.gif
864
865and
866
867.. image:: ..\img\olddocs\image039.gif
868
869The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector which is
870defined as
871
872.. image:: ..\img\olddocs\image040.gif
873
874NB: The outer most radius is used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
875
876The returned value is scaled to units of |cm^-1| and the parameters of this model (for only one shell) are the following
877
878==============  ========  =============
879Parameter name  Units     Default value
880==============  ========  =============
881A_shell1        None      1
882scale           None      1.0
883rad_core        |Ang|     200
884thick_shell1    |Ang|     50
885sld_core        |Ang^-2|  1.0e-06
886sld_in_shell1   |Ang^-2|  1.7e-06
887sld_out_shell1  |Ang^-2|  2.0e-06
888sld_solv        |Ang^-2|  6.4e-06
889background      |cm^-1|   0.0
890==============  ========  =============
891
892NB: *rad_core* represents the core radius (*R1*) and *thick_shell1* (*R2* - *R1*) is the thickness of the shell1, etc.
893
894.. image:: ..\img\olddocs\image041.jpg
895
896*Figure. 1D plot using the default values (w/400 point).*
897
898.. image:: ..\img\olddocs\image042.jpg
899
900*Figure. SLD profile from the default values.*
901
902REFERENCE
903
904L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*,
905Plenum Press, New York, (1987).
906
907
908
909.. _VesicleModel:
910
911**2.1.10. VesicleModel**
912
913This model provides the form factor, *P(q)*, for an unilamellar vesicle. The form factor is normalized by the volume
914of the shell.
915
916*2.1.10.1. Definition*
917
918The 1D scattering intensity is calculated in the following way (Guinier, 1955)
919
920.. image:: ..\img\olddocs\image017.PNG
921
922where *scale* is a scale factor, *Vshell* is the volume of the shell, *V1* is the volume of the core, *V2* is the total
923volume, *R1* is the radius of the core, *R2* is the outer radius of the shell, |rho|\ :sub:`1` is the scattering
924length density of the core and the solvent, |rho|\ :sub:`2` is the scattering length density of the shell, *bkg* is
925the background level, and *J1* = (sin\ *x*- *x* cos\ *x*)/ *x* :sup:`2`\ . The functional form is identical to a
926"typical" core-shell structure, except that the scattering is normalized by the volume that is contributing to the
927scattering, namely the volume of the shell alone. Also, the vesicle is best defined in terms of a core radius (= *R1*)
928and a shell thickness, *t*.
929
930.. image:: ..\img\olddocs\image018.jpg
931
932The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector which is
933defined as
934
935.. image:: ..\img\olddocs\image008.PNG
936
937NB: The outer most radius (= *radius* + *thickness*) is used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)*
938is applied.
939
940The returned value is scaled to units of |cm^-1| and the parameters of the VesicleModel are the following
941
942==============  ========  =============
943Parameter name  Units     Default value
944==============  ========  =============
945scale           None      1.0
946radius          |Ang|     100
947thickness       |Ang|     30
948core_sld        |Ang^-2|  6.3e-6
949shell_sld       |Ang^-2|  0
950background      |cm^-1|   0.0
951==============  ========  =============
952
953NB: *radius* represents the core radius (*R1*) and the *thickness* (*R2* - *R1*) is the shell thickness.
954
955.. image:: ..\img\olddocs\image019.jpg
956
957*Figure. 1D plot using the default values (w/200 data point).*
958
959Our model uses the form factor calculations implemented in a c-library
960provided by the NIST Center for Neutron Research (Kline, 2006).
961
962REFERENCE
963
964A Guinier and G. Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955)
965
966
967
968.. _SphericalSLDModel:
969
970**2.1.11. SphericalSLDModel**
971
972Similarly to the OnionExpShellModel, this model provides the form factor, *P(q)*, for a multi-shell sphere, where the
973interface between the each neighboring shells can be described by one of a number of functions including error,
974power-law, and exponential functions. This model is to calculate the scattering intensity by building a continuous
975custom SLD profile against the radius of the particle. The SLD profile is composed of a flat core, a flat solvent,
976a number (up to 9 ) flat shells, and the interfacial layers between the adjacent flat shells (or core, and solvent)
977(see below). Unlike the OnionExpShellModel (using an analytical integration), the interfacial layers here are
978sub-divided and numerically integrated assuming each of the sub-layers are described by a line function. The number
979of the sub-layer can be given by users by setting the integer values of *npts_inter* in the GUI. The form factor is
980normalized by the total volume of the sphere.
981
982*2.1.11.1. Definition*
983
984The 1D scattering intensity is calculated in the following way:
985
986.. image:: ..\img\olddocs\image022.gif
987
988.. image:: ..\img\olddocs\image043.gif
989
990where, for a spherically symmetric particle with a particle density |rho|\ *(r)*
991
992.. image:: ..\img\olddocs\image024.gif
993
994so that
995
996.. image:: ..\img\olddocs\image044.gif
997
998.. image:: ..\img\olddocs\image045.gif
999
1000.. image:: ..\img\olddocs\image046.gif
1001
1002.. image:: ..\img\olddocs\image047.gif
1003
1004.. image:: ..\img\olddocs\image048.gif
1005
1006.. image:: ..\img\olddocs\image027.gif
1007
1008Here we assumed that the SLDs of the core and solvent are constant against *r*. The SLD at the interface between
1009shells, |rho|\ :sub:`inter_i`, is calculated with a function chosen by an user, where the functions are
1010
10111) Exp
1012
1013.. image:: ..\img\olddocs\image049.gif
1014
10152) Power-Law
1016
1017.. image:: ..\img\olddocs\image050.gif
1018
10193) Erf
1020
1021.. image:: ..\img\olddocs\image051.gif
1022
1023The functions are normalized so that they vary between 0 and 1, and they are constrained such that the SLD is
1024continuous at the boundaries of the interface as well as each sub-layers. Thus *B* and *C* are determined.
1025
1026Once |rho|\ :sub:`rinter_i` is found at the boundary of the sub-layer of the interface, we can find its contribution
1027to the form factor *P(q)*
1028
1029.. image:: ..\img\olddocs\image052.gif
1030
1031.. image:: ..\img\olddocs\image053.gif
1032
1033.. image:: ..\img\olddocs\image054.gif
1034
1035where we assume that |rho|\ :sub:`inter_i`\ *(r)* can be approximately linear within a sub-layer *j*.
1036
1037In the equation
1038
1039.. image:: ..\img\olddocs\image055.gif
1040
1041Finally, the form factor can be calculated by
1042
1043.. image:: ..\img\olddocs\image037.gif
1044
1045where
1046
1047.. image:: ..\img\olddocs\image038.gif
1048
1049and
1050
1051.. image:: ..\img\olddocs\image056.gif
1052
1053The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector which is
1054defined as
1055
1056.. image:: ..\img\olddocs\image040.gif
1057
1058NB: The outer most radius is used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1059
1060The returned value is scaled to units of |cm^-1| and the parameters of this model (for just one shell) are the following
1061
1062==============  ========  =============
1063Parameter name  Units     Default value
1064==============  ========  =============
1065background      |cm^-1|   0.0
1066npts_inter      None      35
1067scale           None      1
1068sld_solv        |Ang^-2|  1e-006
1069func_inter1     None      Erf
1070nu_inter        None      2.5
1071thick_inter1    |Ang|     50
1072sld_flat1       |Ang^-2|  4e-006
1073thick_flat1     |Ang|     100
1074func_inter0     None      Erf
1075nu_inter0       None      2.5
1076rad_core0       |Ang|     50
1077sld_core0       |Ang^-2|  2.07e-06
1078thick_core0     |Ang|     50
1079==============  ========  =============
1080
1081NB: *rad_core0* represents the core radius (*R1*).
1082
1083.. image:: ..\img\olddocs\image057.jpg
1084
1085*Figure. 1D plot using the default values (w/400 point).*
1086
1087.. image:: ..\img\olddocs\image058.jpg
1088
1089*Figure. SLD profile from the default values.*
1090
1091REFERENCE
1092
1093L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*,
1094Plenum Press, New York, (1987)
1095
1096
1097
1098.. _LinearPearlsModel:
1099
1100**2.1.12. LinearPearlsModel**
1101
1102This model provides the form factor for *N* spherical pearls of radius *R* linearly joined by short strings (or segment
1103length or edge separation) *l* (= *A* - 2\ *R*)). *A* is the center-to-center pearl separation distance. The thickness
1104of each string is assumed to be negligible.
1105
1106.. image:: ..\img\olddocs\linearpearls.jpg
1107
1108*2.1.12.1. Definition*
1109
1110The output of the scattering intensity function for the LinearPearlsModel is given by (Dobrynin, 1996)
1111
1112.. image:: ..\img\olddocs\linearpearl_eq1.gif
1113
1114where the mass *m*\ :sub:`p` is (SLD\ :sub:`pearl` - SLD\ :sub:`solvent`) \* (volume of *N* pearls). V is the total
1115volume.
1116
1117The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector.
1118
1119The returned value is scaled to units of |cm^-1| and the parameters of the LinearPearlsModel are the following
1120
1121===============  ========  =============
1122Parameter name   Units     Default value
1123===============  ========  =============
1124scale            None      1.0
1125radius           |Ang|     80.0
1126edge_separation  |Ang|     350.0
1127num_pearls       None      3
1128sld_pearl        |Ang^-2|  1e-6
1129sld_solv         |Ang^-2|  6.3e-6
1130background       |cm^-1|   0.0
1131===============  ========  =============
1132
1133NB: *num_pearls* must be an integer.
1134
1135.. image:: ..\img\olddocs\linearpearl_plot.jpg
1136
1137REFERENCE
1138
1139A V Dobrynin, M Rubinstein and S P Obukhov, *Macromol.*, 29 (1996) 2974-2979
1140
1141
1142
1143.. _PearlNecklaceModel:
1144
1145**2.1.13. PearlNecklaceModel**
1146
1147This model provides the form factor for a pearl necklace composed of two elements: *N* pearls (homogeneous spheres
1148of radius *R*) freely jointed by *M* rods (like strings - with a total mass *Mw* = *M* \* *m*\ :sub:`r` + *N* \* *m*\ :sub:`s`,
1149and the string segment length (or edge separation) *l* (= *A* - 2\ *R*)). *A* is the center-to-center pearl separation
1150distance.
1151
1152.. image:: ..\img\olddocs\pearl_fig.jpg
1153
1154*2.1.13.1. Definition*
1155
1156The output of the scattering intensity function for the PearlNecklaceModel is given by (Schweins, 2004)
1157
1158.. image:: ..\img\olddocs\pearl_eq1.gif
1159
1160where
1161
1162.. image:: ..\img\olddocs\pearl_eq2.gif
1163
1164.. image:: ..\img\olddocs\pearl_eq3.gif
1165
1166.. image:: ..\img\olddocs\pearl_eq4.gif
1167
1168.. image:: ..\img\olddocs\pearl_eq5.gif
1169
1170.. image:: ..\img\olddocs\pearl_eq6.gif
1171
1172and
1173
1174.. image:: ..\img\olddocs\pearl_eq7.gif
1175
1176where the mass *m*\ :sub:`i` is (SLD\ :sub:`i` - SLD\ :sub:`solvent`) \* (volume of the *N* pearls/rods). *V* is the
1177total volume of the necklace.
1178
1179The 2D scattering intensity is the same as *P(q)* above, regardless of the orientation of the *q* vector.
1180
1181The returned value is scaled to units of |cm^-1| and the parameters of the PearlNecklaceModel are the following
1182
1183===============  ========  =============
1184Parameter name   Units     Default value
1185===============  ========  =============
1186scale            None      1.0
1187radius           |Ang|     80.0
1188edge_separation  |Ang|     350.0
1189num_pearls       None      3
1190sld_pearl        |Ang^-2|  1e-6
1191sld_solv         |Ang^-2|  6.3e-6
1192sld_string       |Ang^-2|  1e-6
1193thick_string
1194(=rod diameter)  |Ang|     2.5
1195background       |cm^-1|   0.0
1196===============  ========  =============
1197
1198NB: *num_pearls* must be an integer.
1199
1200.. image:: ..\img\olddocs\pearl_plot.jpg
1201
1202REFERENCE
1203
1204R Schweins and K Huber, *Particle Scattering Factor of Pearl Necklace Chains*, *Macromol. Symp.* 211 (2004) 25-42 2004
1205
1206
1207
1208.. _CylinderModel:
1209
1210**2.1.14. CylinderModel**
1211
1212This model provides the form factor for a right circular cylinder with uniform scattering length density. The form
1213factor is normalized by the particle volume.
1214
1215For information about polarised and magnetic scattering, click here_.
1216
1217*2.1.14.1. Definition*
1218
1219The output of the 2D scattering intensity function for oriented cylinders is given by (Guinier, 1955)
1220
1221.. image:: ..\img\olddocs\image059.PNG
1222
1223where
1224
1225.. image:: ..\img\olddocs\image060.PNG
1226
1227and |alpha| is the angle between the axis of the cylinder and the *q*-vector, *V* is the volume of the cylinder,
1228*L* is the length of the cylinder, *r* is the radius of the cylinder, and |drho| (contrast) is the
1229scattering length density difference between the scatterer and the solvent. *J1* is the first order Bessel function.
1230
1231To provide easy access to the orientation of the cylinder, we define the axis of the cylinder using two angles |theta|
1232and |phi|. Those angles are defined in Figure 1.
1233
1234.. image:: ..\img\olddocs\image061.jpg
1235
1236*Figure 1. Definition of the angles for oriented cylinders.*
1237
1238.. image:: ..\img\olddocs\image062.jpg
1239
1240*Figure 2. Examples of the angles for oriented pp against the detector plane.*
1241
1242NB: The 2nd virial coefficient of the cylinder is calculated based on the radius and length values, and used as the
1243effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1244
1245The returned value is scaled to units of |cm^-1| and the parameters of the CylinderModel are the following:
1246
1247==============  ========  =============
1248Parameter name  Units     Default value
1249==============  ========  =============
1250scale           None      1.0
1251radius          |Ang|     20.0
1252length          |Ang|     400.0
1253contrast        |Ang^-2|  3.0e-6
1254background      |cm^-1|   0.0
1255cyl_theta       degree    60
1256cyl_phi         degree    60
1257==============  ========  =============
1258
1259The output of the 1D scattering intensity function for randomly oriented cylinders is then given by
1260
1261.. image:: ..\img\olddocs\image063.PNG
1262
1263The *cyl_theta* and *cyl_phi* parameter are not used for the 1D output. Our implementation of the scattering kernel
1264and the 1D scattering intensity use the c-library from NIST.
1265
1266*2.1.14.2. Validation of the CylinderModel*
1267
1268Validation of our code was done by comparing the output of the 1D model to the output of the software provided by the
1269NIST (Kline, 2006). Figure 3 shows a comparison of the 1D output of our model and the output of the NIST software.
1270
1271.. image:: ..\img\olddocs\image065.jpg
1272
1273*Figure 3: Comparison of the SasView scattering intensity for a cylinder with the output of the NIST SANS analysis*
1274*software.* The parameters were set to: *Scale* = 1.0, *Radius* = 20 |Ang|, *Length* = 400 |Ang|,
1275*Contrast* = 3e-6 |Ang^-2|, and *Background* = 0.01 |cm^-1|.
1276
1277In general, averaging over a distribution of orientations is done by evaluating the following
1278
1279.. image:: ..\img\olddocs\image064.PNG
1280
1281where *p(*\ |theta|,\ |phi|\ *)* is the probability distribution for the orientation and |P0|\ *(q,*\ |alpha|\ *)* is
1282the scattering intensity for the fully oriented system. Since we have no other software to compare the implementation
1283of the intensity for fully oriented cylinders, we can compare the result of averaging our 2D output using a uniform
1284distribution *p(*\ |theta|,\ |phi|\ *)* = 1.0. Figure 4 shows the result of such a cross-check.
1285
1286.. image:: ..\img\olddocs\image066.jpg
1287
1288*Figure 4: Comparison of the intensity for uniformly distributed cylinders calculated from our 2D model and the*
1289*intensity from the NIST SANS analysis software.* The parameters used were: *Scale* = 1.0, *Radius* = 20 |Ang|,
1290*Length* = 400 |Ang|, *Contrast* = 3e-6 |Ang^-2|, and *Background* = 0.0 |cm^-1|.
1291
1292
1293
1294.. _HollowCylinderModel:
1295
1296**2.1.15. HollowCylinderModel**
1297
1298This model provides the form factor, *P(q)*, for a monodisperse hollow right angle circular cylinder (tube) where the
1299form factor is normalized by the volume of the tube
1300
1301*P(q)* = *scale* \* *<F*\ :sup:`2`\ *>* / *V*\ :sub:`shell` + *background*
1302
1303where the averaging < > is applied only for the 1D calculation.
1304
1305The inside and outside of the hollow cylinder are assumed have the same SLD.
1306
1307*2.1.15.1 Definition*
1308
1309The 1D scattering intensity is calculated in the following way (Guinier, 1955)
1310
1311.. image:: ..\img\olddocs\image072.PNG
1312
1313where *scale* is a scale factor, *J1* is the 1st order Bessel function, *J1(x)* = (sin *x* - *x* cos *x*)/ *x*\ :sup:`2`.
1314
1315To provide easy access to the orientation of the core-shell cylinder, we define the axis of the cylinder using two
1316angles |theta| and |phi|\ . As for the case of the cylinder, those angles are defined in Figure 2 of the CylinderModel.
1317
1318NB: The 2nd virial coefficient of the cylinder is calculated based on the radius and 2 length values, and used as the
1319effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1320
1321In the parameters, the contrast represents SLD :sub:`shell` - SLD :sub:`solvent` and the *radius* = *R*\ :sub:`shell`
1322while *core_radius* = *R*\ :sub:`core`.
1323
1324==============  ========  =============
1325Parameter name  Units     Default value
1326==============  ========  =============
1327scale           None      1.0
1328radius          |Ang|     30
1329length          |Ang|     400
1330core_radius     |Ang|     20
1331sldCyl          |Ang^-2|  6.3e-6
1332sldSolv         |Ang^-2|  5e-06
1333background      |cm^-1|   0.01
1334==============  ========  =============
1335
1336.. image:: ..\img\olddocs\image074.jpg
1337
1338*Figure. 1D plot using the default values (w/1000 data point).*
1339
1340Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
1341(Kline, 2006).
1342
1343.. image:: ..\img\olddocs\image061.jpg
1344
1345*Figure. Definition of the angles for the oriented HollowCylinderModel.*
1346
1347.. image:: ..\img\olddocs\image062.jpg
1348
1349*Figure. Examples of the angles for oriented pp against the detector plane.*
1350
1351REFERENCE
1352
1353L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum Press,
1354New York, (1987)
1355
1356
1357
1358.. _CappedCylinderModel:
1359
1360**2.1.16 CappedCylinderModel**
1361
1362Calculates the scattering from a cylinder with spherical section end-caps. This model simply becomes the ConvexLensModel
1363when the length of the cylinder *L* = 0, that is, a sphereocylinder with end caps that have a radius larger than that
1364of the cylinder and the center of the end cap radius lies within the cylinder. See the diagram for the details
1365of the geometry and restrictions on parameter values.
1366
1367*2.1.16.1. Definition*
1368
1369The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
1370
1371The Capped Cylinder geometry is defined as
1372
1373.. image:: ..\img\olddocs\image112.jpg
1374
1375where *r* is the radius of the cylinder. All other parameters are as defined in the diagram. Since the end cap radius
1376*R* >= *r* and by definition for this geometry *h* < 0, *h* is then defined by *r* and *R* as
1377
1378*h* = -1 \* sqrt(*R*\ :sup:`2` - *r*\ :sup:`2`)
1379
1380The scattered intensity *I(q)* is calculated as
1381
1382.. image:: ..\img\olddocs\image113.jpg
1383
1384where the amplitude *A(q)* is given as
1385
1386.. image:: ..\img\olddocs\image114.jpg
1387
1388The < > brackets denote an average of the structure over all orientations. <\ *A*\ :sup:`2`\ *(q)*> is then the form
1389factor, *P(q)*. The scale factor is equivalent to the volume fraction of cylinders, each of volume, *V*. Contrast is the
1390difference of scattering length densities of the cylinder and the surrounding solvent.
1391
1392The volume of the Capped Cylinder is (with *h* as a positive value here)
1393
1394.. image:: ..\img\olddocs\image115.jpg
1395
1396and its radius-of-gyration
1397
1398.. image:: ..\img\olddocs\image116.jpg
1399
1400**The requirement that** *R* >= *r* **is not enforced in the model! It is up to you to restrict this during analysis.**
1401
1402This following example dataset is produced by running the MacroCappedCylinder(), using 200 data points,
1403*qmin* = 0.001 |Ang^-1|, *qmax* = 0.7 |Ang^-1| and the default values
1404
1405==============  ========  =============
1406Parameter name  Units     Default value
1407==============  ========  =============
1408scale           None      1.0
1409len_cyl         |Ang|     400.0
1410rad_cap         |Ang|     40.0
1411rad_cyl         |Ang|     20.0
1412sld_capcyl      |Ang^-2|  1.0e-006
1413sld_solv        |Ang^-2|  6.3e-006
1414background      |cm^-1|   0
1415==============  ========  =============
1416
1417.. image:: ..\img\olddocs\image117.jpg
1418
1419*Figure. 1D plot using the default values (w/256 data point).*
1420
1421For 2D data: The 2D scattering intensity is calculated similar to the 2D cylinder model. For example, for
1422|theta| = 45 deg and |phi| =0 deg with default values for other parameters
1423
1424.. image:: ..\img\olddocs\image118.jpg
1425
1426*Figure. 2D plot (w/(256X265) data points).*
1427
1428.. image:: ..\img\olddocs\image061.jpg
1429
1430*Figure. Definition of the angles for oriented 2D cylinders.*
1431
1432.. image:: ..\img\olddocs\image062.jpg
1433
1434*Figure. Examples of the angles for oriented pp against the detector plane.*
1435
1436REFERENCE
1437
1438H Kaya, *J. Appl. Cryst.*, 37 (2004) 223-230
1439
1440H Kaya and N-R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda and errata)
1441
1442
1443
1444.. _CoreShellCylinderModel:
1445
1446**2.1.17. CoreShellCylinderModel**
1447
1448This model provides the form factor for a circular cylinder with a core-shell scattering length density profile. The
1449form factor is normalized by the particle volume.
1450
1451*2.1.17.1. Definition*
1452
1453The output of the 2D scattering intensity function for oriented core-shell cylinders is given by (Kline, 2006)
1454
1455.. image:: ..\img\olddocs\image067.PNG
1456
1457where
1458
1459.. image:: ..\img\olddocs\image068.PNG
1460
1461.. image:: ..\img\olddocs\image239.PNG
1462
1463and |alpha| is the angle between the axis of the cylinder and the *q*\ -vector, *Vs* is the volume of the outer shell
1464(i.e. the total volume, including the shell), *Vc* is the volume of the core, *L* is the length of the core, *r* is the
1465radius of the core, *t* is the thickness of the shell, |rho|\ :sub:`c` is the scattering length density of the core,
1466|rho|\ :sub:`s` is the scattering length density of the shell, |rho|\ :sub:`solv` is the scattering length density of
1467the solvent, and *bkg* is the background level. The outer radius of the shell is given by *r+t* and the total length of
1468the outer shell is given by *L+2t*. *J1* is the first order Bessel function.
1469
1470.. image:: ..\img\olddocs\image069.jpg
1471
1472To provide easy access to the orientation of the core-shell cylinder, we define the axis of the cylinder using two
1473angles |theta| and |phi|\ . As for the case of the cylinder, those angles are defined in Figure 2 of the CylinderModel.
1474
1475NB: The 2nd virial coefficient of the cylinder is calculated based on the radius and 2 length values, and used as the
1476effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1477
1478The returned value is scaled to units of |cm^-1| and the parameters of the core-shell cylinder model are the following
1479
1480==============  ========  =============
1481Parameter name  Units     Default value
1482==============  ========  =============
1483scale           None      1.0
1484radius          |Ang|     20.0
1485thickness       |Ang|     10.0
1486length          |Ang|     400.0
1487core_sld        |Ang^-2|  1e-6
1488shell_sld       |Ang^-2|  4e-6
1489solvent_sld     |Ang^-2|  1e-6
1490background      |cm^-1|   0.0
1491axis_theta      degree    90
1492axis_phi        degree    0.0
1493==============  ========  =============
1494
1495The output of the 1D scattering intensity function for randomly oriented cylinders is then given by the equation above.
1496
1497The *axis_theta* and *axis_phi* parameters are not used for the 1D output. Our implementation of the scattering kernel
1498and the 1D scattering intensity use the c-library from NIST.
1499
1500*2.1.17.2. Validation of the CoreShellCylinderModel*
1501
1502Validation of our code was done by comparing the output of the 1D model to the output of the software provided by the
1503NIST (Kline, 2006). Figure 1 shows a comparison of the 1D output of our model and the output of the NIST software.
1504
1505.. image:: ..\img\olddocs\image070.jpg
1506
1507*Figure 1: Comparison of the SasView scattering intensity for a core-shell cylinder with the output of the NIST SANS*
1508*analysis software.* The parameters were set to: *Scale* = 1.0, *Radius* = 20 |Ang|, *Thickness* = 10 |Ang|,
1509*Length* = 400 |Ang|, *Core_sld* = 1e-6 |Ang^-2|, *Shell_sld* = 4e-6 |Ang^-2|, *Solvent_sld* = 1e-6 |Ang^-2|,
1510and *Background* = 0.01 |cm^-1|.
1511
1512Averaging over a distribution of orientation is done by evaluating the equation above. Since we have no other software
1513to compare the implementation of the intensity for fully oriented cylinders, we can compare the result of averaging our
15142D output using a uniform distribution *p(*\ |theta|,\ |phi|\ *)* = 1.0. Figure 2 shows the result of such a cross-check.
1515
1516.. image:: ..\img\olddocs\image071.jpg
1517
1518*Figure 2: Comparison of the intensity for uniformly distributed core-shell cylinders calculated from our 2D model and*
1519*the intensity from the NIST SANS analysis software.* The parameters used were: *Scale* = 1.0, *Radius* = 20 |Ang|,
1520*Thickness* = 10 |Ang|, *Length* =400 |Ang|, *Core_sld* = 1e-6 |Ang^-2|, *Shell_sld* = 4e-6 |Ang^-2|,
1521*Solvent_sld* = 1e-6 |Ang^-2|, and *Background* = 0.0 |cm^-1|.
1522
1523.. image:: ..\img\olddocs\image061.jpg
1524
1525*Figure. Definition of the angles for oriented core-shell cylinders.*
1526
1527.. image:: ..\img\olddocs\image062.jpg
1528
1529*Figure. Examples of the angles for oriented pp against the detector plane.*
1530
15312013/11/26 - Description reviewed by Heenan, R.
1532
1533
1534
1535.. _EllipticalCylinderModel:
1536
1537**2.1.18 EllipticalCylinderModel**
1538
1539This function calculates the scattering from an elliptical cylinder.
1540
1541*2.1.18.1 Definition for 2D (orientated system)*
1542
1543The angles |theta| and |phi| define the orientation of the axis of the cylinder. The angle |bigpsi| is defined as the
1544orientation of the major axis of the ellipse with respect to the vector *Q*\ . A gaussian polydispersity can be added
1545to any of the orientation angles, and also for the minor radius and the ratio of the ellipse radii.
1546
1547.. image:: ..\img\olddocs\image098.gif
1548
1549*Figure.* *a* = *r_minor* and |nu|\ :sub:`n` = *r_ratio* (i.e., *r_major* / *r_minor*).
1550
1551The function calculated is
1552
1553.. image:: ..\img\olddocs\image099.PNG
1554
1555with the functions
1556
1557.. image:: ..\img\olddocs\image100.PNG
1558
1559and the angle |bigpsi| is defined as the orientation of the major axis of the ellipse with respect to the vector *q*\ .
1560
1561*2.1.18.2 Definition for 1D (no preferred orientation)*
1562
1563The form factor is averaged over all possible orientation before normalized by the particle volume
1564
1565*P(q)* = *scale* \* <*F*\ :sup:`2`> / *V*
1566
1567The returned value is scaled to units of |cm^-1|.
1568
1569To provide easy access to the orientation of the elliptical cylinder, we define the axis of the cylinder using two
1570angles |theta|, |phi| and |bigpsi|. As for the case of the cylinder, the angles |theta| and |phi| are defined on
1571Figure 2 of CylinderModel. The angle |bigpsi| is the rotational angle around its own long_c axis against the *q* plane.
1572For example, |bigpsi| = 0 when the *r_minor* axis is parallel to the *x*\ -axis of the detector.
1573
1574All angle parameters are valid and given only for 2D calculation; ie, an oriented system.
1575
1576.. image:: ..\img\olddocs\image101.jpg
1577
1578*Figure. Definition of angles for 2D*
1579
1580.. image:: ..\img\olddocs\image062.jpg
1581
1582*Figure. Examples of the angles for oriented elliptical cylinders against the detector plane.*
1583
1584NB: The 2nd virial coefficient of the cylinder is calculated based on the averaged radius (= sqrt(*r_minor*\ :sup:`2` \* *r_ratio*))
1585and length values, and used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1586
1587==============  ========  =============
1588Parameter name  Units     Default value
1589==============  ========  =============
1590scale           None      1.0
1591r_minor         |Ang|     20.0
1592r_ratio         |Ang|     1.5
1593length          |Ang|     400.0
1594sldCyl          |Ang^-2|  4e-06
1595sldSolv         |Ang^-2|  1e-06
1596background      |cm^-1|   0
1597==============  ========  =============
1598
1599.. image:: ..\img\olddocs\image102.jpg
1600
1601*Figure. 1D plot using the default values (w/1000 data point).*
1602
1603*2.1.18.3 Validation of the EllipticalCylinderModel*
1604
1605Validation of our code was done by comparing the output of the 1D calculation to the angular average of the output of
1606the 2D calculation over all possible angles. The figure below shows the comparison where the solid dot refers to
1607averaged 2D values while the line represents the result of the 1D calculation (for the 2D averaging, values of 76, 180,
1608and 76 degrees are taken for the angles of |theta|, |phi|, and |bigpsi| respectively).
1609
1610.. image:: ..\img\olddocs\image103.gif
1611
1612*Figure. Comparison between 1D and averaged 2D.*
1613
1614In the 2D average, more binning in the angle |phi| is necessary to get the proper result. The following figure shows
1615the results of the averaging by varying the number of angular bins.
1616
1617.. image:: ..\img\olddocs\image104.gif
1618
1619*Figure. The intensities averaged from 2D over different numbers of bins and angles.*
1620
1621REFERENCE
1622
1623L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum,
1624New York, (1987)
1625
1626
1627
1628.. _FlexibleCylinderModel:
1629
1630**2.1.19. FlexibleCylinderModel**
1631
1632This model provides the form factor, *P(q)*, for a flexible cylinder where the form factor is normalized by the volume
1633of the cylinder. **Inter-cylinder interactions are NOT provided for.**
1634
1635*P(q)* = *scale* \* <*F*\ :sup:`2`> / *V* + *background*
1636
1637where the averaging < > is applied over all orientations for 1D.
1638
1639The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
1640
1641.. image:: ..\img\olddocs\image040.gif
1642
1643*2.1.19.1. Definition*
1644
1645.. image:: ..\img\olddocs\image075.jpg
1646
1647The chain of contour length, *L*, (the total length) can be described as a chain of some number of locally stiff
1648segments of length *l*\ :sub:`p`\ , the persistence length (the length along the cylinder over which the flexible
1649cylinder can be considered a rigid rod). The Kuhn length (*b* = 2 \* *l* :sub:`p`) is also used to describe the
1650stiffness of a chain.
1651
1652The returned value is in units of |cm^-1|, on absolute scale.
1653
1654In the parameters, the sldCyl and sldSolv represent the SLD of the chain/cylinder and solvent respectively.
1655
1656==============  ========  =============
1657Parameter name  Units     Default value
1658==============  ========  =============
1659scale           None      1.0
1660radius          |Ang|     20
1661length          |Ang|     1000
1662sldCyl          |Ang^-2|  1e-06
1663sldSolv         |Ang^-2|  6.3e-06
1664background      |cm^-1|   0.01
1665kuhn_length     |Ang|     100
1666==============  ========  =============
1667
1668.. image:: ..\img\olddocs\image076.jpg
1669
1670*Figure. 1D plot using the default values (w/1000 data point).*
1671
1672Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
1673(Kline, 2006).
1674
1675From the reference
1676
1677  "Method 3 With Excluded Volume" is used. The model is a parametrization of simulations of a discrete representation
1678  of the worm-like chain model of Kratky and Porod applied in the pseudocontinuous limit. See equations (13,26-27) in
1679  the original reference for the details.
1680
1681REFERENCE
1682
1683J S Pedersen and P Schurtenberger. *Scattering functions of semiflexible polymers with and without excluded volume*
1684*effects*. *Macromolecules*, 29 (1996) 7602-7612
1685
1686Correction of the formula can be found in
1687
1688W R Chen, P D Butler and L J Magid, *Incorporating Intermicellar Interactions in the Fitting of SANS Data from*
1689*Cationic Wormlike Micelles*. *Langmuir*, 22(15) 2006 6539–6548
1690
1691
1692
1693.. _FlexCylEllipXModel:
1694
1695**2.1.20 FlexCylEllipXModel**
1696
1697This model calculates the form factor for a flexible cylinder with an elliptical cross section and a uniform scattering
1698length density. The non-negligible diameter of the cylinder is included by accounting for excluded volume interactions
1699within the walk of a single cylinder. The form factor is normalized by the particle volume such that
1700
1701*P(q)* = *scale* \* <*F*\ :sup:`2`> / *V* + *background*
1702
1703where < > is an average over all possible orientations of the flexible cylinder.
1704
1705*2.1.20.1. Definition*
1706
1707The function calculated is from the reference given below. From that paper, "Method 3 With Excluded Volume" is used.
1708The model is a parameterization of simulations of a discrete representation of the worm-like chain model of Kratky and
1709Porod applied in the pseudo-continuous limit. See equations (13, 26-27) in the original reference for the details.
1710
1711NB: there are several typos in the original reference that have been corrected by WRC. Details of the corrections are
1712in the reference below. Most notably
1713
1714- Equation (13): the term (1 - w(QR)) should swap position with w(QR)
1715
1716- Equations (23) and (24) are incorrect; WRC has entered these into Mathematica and solved analytically. The results
1717  were then converted to code.
1718
1719- Equation (27) should be q0 = max(a3/sqrt(RgSquare),3) instead of max(a3*b/sqrt(RgSquare),3)
1720
1721- The scattering function is negative for a range of parameter values and q-values that are experimentally accessible. A correction function has been added to give the proper behavior.
1722
1723.. image:: ..\img\olddocs\image077.jpg
1724
1725The chain of contour length, *L*, (the total length) can be described as a chain of some number of locally stiff
1726segments of length *l*\ :sub:`p`\ , the persistence length (the length along the cylinder over which the flexible
1727cylinder can be considered a rigid rod). The Kuhn length (*b* = 2 \* *l* :sub:`p`) is also used to describe the
1728stiffness of a chain.
1729
1730The cross section of the cylinder is elliptical, with minor radius *a*\ . The major radius is larger, so of course,
1731**the axis ratio (parameter 4) must be greater than one.** Simple constraints should be applied during curve fitting to
1732maintain this inequality.
1733
1734The returned value is in units of |cm^-1|, on absolute scale.
1735
1736In the parameters, *sldCyl* and *sldSolv* represent the SLD of the chain/cylinder and solvent respectively. The
1737*scale*, and the contrast are both multiplicative factors in the model and are perfectly correlated. One or both of
1738these parameters must be held fixed during model fitting.
1739
1740If the scale is set equal to the particle volume fraction, |phi|, the returned value is the scattered intensity per
1741unit volume, *I(q)* = |phi| \* *P(q)*.
1742
1743**No inter-cylinder interference effects are included in this calculation.**
1744
1745For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
1746
1747.. image:: ..\img\olddocs\image008.PNG
1748
1749This example dataset is produced by running the Macro FlexCylEllipXModel, using 200 data points, *qmin* = 0.001 |Ang^-1|,
1750*qmax* = 0.7 |Ang^-1| and the default values below
1751
1752==============  ========  =============
1753Parameter name  Units     Default value
1754==============  ========  =============
1755axis_ratio      None      1.5
1756background      |cm^-1|   0.0001
1757Kuhn_length     |Ang|     100
1758Contour length  |Ang|     1e+3
1759radius          |Ang|     20.0
1760scale           None      1.0
1761sldCyl          |Ang^-2|  1e-6
1762sldSolv         |Ang^-2|  6.3e-6
1763==============  ========  =============
1764
1765.. image:: ..\img\olddocs\image078.jpg
1766
1767*Figure. 1D plot using the default values (w/200 data points).*
1768
1769REFERENCE
1770
1771J S Pedersen and P Schurtenberger. *Scattering functions of semiflexible polymers with and without excluded volume*
1772*effects*. *Macromolecules*, 29 (1996) 7602-7612
1773
1774Correction of the formula can be found in
1775
1776W R Chen, P D Butler and L J Magid, *Incorporating Intermicellar Interactions in the Fitting of SANS Data from*
1777*Cationic Wormlike Micelles*. *Langmuir*, 22(15) 2006 6539–6548
1778
1779
1780
1781.. _CoreShellBicelleModel:
1782
1783**2.1.21 CoreShellBicelleModel**
1784
1785This model provides the form factor for a circular cylinder with a core-shell scattering length density profile. The
1786form factor is normalized by the particle volume.
1787
1788This model is a more general case of core-shell cylinder model (see above and reference below) in that the parameters
1789of the shell are separated into a face-shell and a rim-shell so that users can set different values of the thicknesses
1790and SLDs.
1791
1792.. image:: ..\img\olddocs\image240.png
1793
1794*(Graphic from DOI: 10.1039/C0NP00002G)*
1795
1796The returned value is scaled to units of |cm^-1| and the parameters of the CoreShellBicelleModel are the following
1797
1798==============  ========  =============
1799Parameter name  Units     Default value
1800==============  ========  =============
1801scale           None      1.0
1802radius          |Ang|     20.0
1803rim_thick       |Ang|     10.0
1804face_thick      |Ang|     10.0
1805length          |Ang|     400.0
1806core_sld        |Ang^-2|  1e-6
1807rim_sld         |Ang^-2|  4e-6
1808face_sld        |Ang^-2|  4e-6
1809solvent_sld     |Ang^-2|  1e-6
1810background      |cm^-1|   0.0
1811axis_theta      degree    90
1812axis_phi        degree    0.0
1813==============  ========  =============
1814
1815The output of the 1D scattering intensity function for randomly oriented cylinders is then given by the equation above.
1816
1817The *axis_theta* and *axis_phi* parameters are not used for the 1D output. Our implementation of the scattering kernel
1818and the 1D scattering intensity use the c-library from NIST.
1819
1820.. image:: ..\img\olddocs\cscylbicelle_pic.jpg
1821
1822*Figure. 1D plot using the default values (w/200 data point).*
1823
1824.. image:: ..\img\olddocs\image061.jpg
1825
1826*Figure. Definition of the angles for the oriented CoreShellBicelleModel.*
1827
1828.. image:: ..\img\olddocs\image062.jpg
1829
1830*Figure. Examples of the angles for oriented pp against the detector plane.*
1831
1832REFERENCE
1833
1834L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum Press,
1835New York, (1987)
1836
1837
1838
1839.. _BarBellModel:
1840
1841**2.1.22. BarBellModel**
1842
1843Calculates the scattering from a barbell-shaped cylinder (This model simply becomes the DumBellModel when the length of
1844the cylinder, *L*, is set to zero). That is, a sphereocylinder with spherical end caps that have a radius larger than
1845that of the cylinder and the center of the end cap radius lies outside of the cylinder. All dimensions of the BarBell
1846are considered to be monodisperse. See the diagram for the details of the geometry and restrictions on parameter values.
1847
1848*2.1.22.1. Definition*
1849
1850The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
1851
1852The barbell geometry is defined as
1853
1854.. image:: ..\img\olddocs\image105.jpg
1855
1856where *r* is the radius of the cylinder. All other parameters are as defined in the diagram.
1857
1858Since the end cap radius
1859*R* >= *r* and by definition for this geometry *h* < 0, *h* is then defined by *r* and *R* as
1860
1861*h* = -1 \* sqrt(*R*\ :sup:`2` - *r*\ :sup:`2`)
1862
1863The scattered intensity *I(q)* is calculated as
1864
1865.. image:: ..\img\olddocs\image106.PNG
1866
1867where the amplitude *A(q)* is given as
1868
1869.. image:: ..\img\olddocs\image107.PNG
1870
1871The < > brackets denote an average of the structure over all orientations. <*A* :sup:`2`\ *(q)*> is then the form
1872factor, *P(q)*. The scale factor is equivalent to the volume fraction of cylinders, each of volume, *V*. Contrast is
1873the difference of scattering length densities of the cylinder and the surrounding solvent.
1874
1875The volume of the barbell is
1876
1877.. image:: ..\img\olddocs\image108.jpg
1878
1879
1880and its radius-of-gyration is
1881
1882.. image:: ..\img\olddocs\image109.jpg
1883
1884**The requirement that** *R* >= *r* **is not enforced in the model!** It is up to you to restrict this during analysis.
1885
1886This example dataset is produced by running the Macro PlotBarbell(), using 200 data points, *qmin* = 0.001 |Ang^-1|,
1887*qmax* = 0.7 |Ang^-1| and the following default values
1888
1889==============  ========  =============
1890Parameter name  Units     Default value
1891==============  ========  =============
1892scale           None      1.0
1893len_bar         |Ang|     400.0
1894rad_bar         |Ang|     20.0
1895rad_bell        |Ang|     40.0
1896sld_barbell     |Ang^-2|  1.0e-006
1897sld_solv        |Ang^-2|  6.3e-006
1898background      |cm^-1|   0
1899==============  ========  =============
1900
1901.. image:: ..\img\olddocs\image110.jpg
1902
1903*Figure. 1D plot using the default values (w/256 data point).*
1904
1905For 2D data: The 2D scattering intensity is calculated similar to the 2D cylinder model. For example, for
1906|theta| = 45 deg and |phi| = 0 deg with default values for other parameters
1907
1908.. image:: ..\img\olddocs\image111.jpg
1909
1910*Figure. 2D plot (w/(256X265) data points).*
1911
1912.. image:: ..\img\olddocs\image061.jpg
1913
1914*Figure. Examples of the angles for oriented pp against the detector plane.*
1915
1916.. image:: ..\img\olddocs\image062.jpg
1917
1918Figure. Definition of the angles for oriented 2D barbells.
1919
1920REFERENCE
1921
1922H Kaya, *J. Appl. Cryst.*, 37 (2004) 37 223-230
1923
1924H Kaya and N R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda and errata)
1925
1926
1927
1928.. _StackedDisksModel:
1929
1930**2.1.23. StackedDisksModel**
1931
1932This model provides the form factor, *P(q)*, for stacked discs (tactoids) with a core/layer structure where the form
1933factor is normalized by the volume of the cylinder. Assuming the next neighbor distance (d-spacing) in a stack of
1934parallel discs obeys a Gaussian distribution, a structure factor *S(q)* proposed by Kratky and Porod in 1949 is used
1935in this function.
1936
1937Note that the resolution smearing calculation uses 76 Gauss quadrature points to properly smear the model since the
1938function is HIGHLY oscillatory, especially around the *q*-values that correspond to the repeat distance of the layers.
1939
1940The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
1941
1942.. image:: ..\img\olddocs\image008.PNG
1943
1944The returned value is in units of |cm^-1| |sr^-1|, on absolute scale.
1945
1946*2.1.23.1 Definition*
1947
1948.. image:: ..\img\olddocs\image079.gif
1949
1950The scattering intensity *I(q)* is
1951
1952.. image:: ..\img\olddocs\image081.PNG
1953
1954where the contrast
1955
1956.. image:: ..\img\olddocs\image082.PNG
1957
1958and *N* is the number of discs per unit volume, |alpha| is the angle between the axis of the disc and *q*, and *Vt*
1959and *Vc* are the total volume and the core volume of a single disc, respectively.
1960
1961.. image:: ..\img\olddocs\image083.PNG
1962
1963where *d* = thickness of the layer (*layer_thick*), 2\ *h* = core thickness (*core_thick*), and *R* = radius of the
1964disc (*radius*).
1965
1966.. image:: ..\img\olddocs\image084.PNG
1967
1968where *n* = the total number of the disc stacked (*n_stacking*), *D* = the next neighbor center-to-center distance
1969(*d-spacing*), and |sigma|\ D= the Gaussian standard deviation of the d-spacing (*sigma_d*).
1970
1971To provide easy access to the orientation of the stacked disks, we define the axis of the cylinder using two angles
1972|theta| and |phi|. These angles are defined on Figure 2 of CylinderModel.
1973
1974NB: The 2nd virial coefficient of the cylinder is calculated based on the *radius* and *length* = *n_stacking* \*
1975(*core_thick* + 2 \* *layer_thick*) values, and used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
1976
1977==============  ========  =============
1978Parameter name  Units     Default value
1979==============  ========  =============
1980background      |cm^-1|   0.001
1981core_sld        |Ang^-2|  4e-006
1982core_thick      |Ang|     10
1983layer_sld       |Ang^-2|  0
1984layer_thick     |Ang|     15
1985n_stacking      None      1
1986radius          |Ang|     3e+03
1987scale           None      0.01
1988sigma_d         |Ang|     0
1989solvent_sld     |Ang^-2|  5e-06
1990==============  ========  =============
1991
1992.. image:: ..\img\olddocs\image085.jpg
1993
1994*Figure. 1D plot using the default values (w/1000 data point).*
1995
1996.. image:: ..\img\olddocs\image086.jpg
1997
1998*Figure. Examples of the angles for oriented stackeddisks against the detector plane.*
1999
2000.. image:: ..\img\olddocs\image062.jpg
2001
2002*Figure. Examples of the angles for oriented pp against the detector plane.*
2003
2004Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2005(Kline, 2006)
2006
2007REFERENCE
2008
2009A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, 1955
2010
2011O Kratky and G Porod, *J. Colloid Science*, 4, (1949) 35
2012
2013J S Higgins and H C Benoit, *Polymers and Neutron Scattering*, Clarendon, Oxford, 1994
2014
2015
2016
2017.. _PringleModel:
2018
2019**2.1.24. PringleModel**
2020
2021This model provides the form factor, *P(q)*, for a 'pringle' or 'saddle-shaped' object (a hyperbolic paraboloid).
2022
2023.. image:: ..\img\olddocs\image241.png
2024
2025*(Graphic from Matt Henderson, matt@matthen.com)*
2026
2027The returned value is in units of |cm^-1|, on absolute scale.
2028
2029The form factor calculated is
2030
2031.. image:: ..\img\olddocs\pringle_eqn_1.jpg
2032
2033where
2034
2035.. image:: ..\img\olddocs\pringle_eqn_2.jpg
2036
2037The parameters of the model and a plot comparing the pringle model with the equivalent cylinder are shown below.
2038
2039==============  ========  =============
2040Parameter name  Units     Default value
2041==============  ========  =============
2042background      |cm^-1|   0.0
2043alpha           None      0.001
2044beta            None      0.02
2045radius          |Ang|     60
2046scale           None      1
2047sld_pringle     |Ang^-2|  1e-06
2048sld_solvent     |Ang^-2|  6.3e-06
2049thickness       |Ang|     10
2050==============  ========  =============
2051
2052.. image:: ..\img\olddocs\pringle-vs-cylinder.png
2053
2054*Figure. 1D plot using the default values (w/150 data point).*
2055
2056REFERENCE
2057
2058S Alexandru Rautu, Private Communication.
2059
2060
2061
2062.. _EllipsoidModel:
2063
2064**2.1.25. EllipsoidModel**
2065
2066This model provides the form factor for an ellipsoid (ellipsoid of revolution) with uniform scattering length density.
2067The form factor is normalized by the particle volume.
2068
2069*2.1.25.1. Definition*
2070
2071The output of the 2D scattering intensity function for oriented ellipsoids is given by (Feigin, 1987)
2072
2073.. image:: ..\img\olddocs\image059.PNG
2074
2075where
2076
2077.. image:: ..\img\olddocs\image119.PNG
2078
2079and
2080
2081.. image:: ..\img\olddocs\image120.PNG
2082
2083|alpha| is the angle between the axis of the ellipsoid and the *q*\ -vector, *V* is the volume of the ellipsoid, *Ra*
2084is the radius along the rotational axis of the ellipsoid, *Rb* is the radius perpendicular to the rotational axis of
2085the ellipsoid and |drho| (contrast) is the scattering length density difference between the scatterer and
2086the solvent.
2087
2088To provide easy access to the orientation of the ellipsoid, we define the rotation axis of the ellipsoid using two
2089angles |theta| and |phi|\ . These angles are defined on Figure 2 of the CylinderModel_. For the ellipsoid, |theta|
2090is the angle between the rotational axis and the *z*\ -axis.
2091
2092NB: The 2nd virial coefficient of the solid ellipsoid is calculated based on the *radius_a* and *radius_b* values, and
2093used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
2094
2095The returned value is scaled to units of |cm^-1| and the parameters of the EllipsoidModel are the following
2096
2097================  ========  =============
2098Parameter name    Units     Default value
2099================  ========  =============
2100scale             None      1.0
2101radius_a (polar)  |Ang|     20.0
2102radius_b (equat)  |Ang|     400.0
2103sldEll            |Ang^-2|  4.0e-6
2104sldSolv           |Ang^-2|  1.0e-6
2105background        |cm^-1|   0.0
2106axis_theta        degree    90
2107axis_phi          degree    0.0
2108================  ========  =============
2109
2110The output of the 1D scattering intensity function for randomly oriented ellipsoids is then given by the equation
2111above.
2112
2113.. image:: ..\img\olddocs\image121.jpg
2114
2115The *axis_theta* and *axis_phi* parameters are not used for the 1D output. Our implementation of the scattering
2116kernel and the 1D scattering intensity use the c-library from NIST.
2117
2118.. image:: ..\img\olddocs\image122.jpg
2119
2120*Figure. The angles for oriented ellipsoid.*
2121
2122*2.1.25.1. Validation of the EllipsoidModel*
2123
2124Validation of our code was done by comparing the output of the 1D model to the output of the software provided by the
2125NIST (Kline, 2006). Figure 1 below shows a comparison of the 1D output of our model and the output of the NIST
2126software.
2127
2128.. image:: ..\img\olddocs\image123.jpg
2129
2130*Figure 1: Comparison of the SasView scattering intensity for an ellipsoid with the output of the NIST SANS analysis*
2131*software.* The parameters were set to: *Scale* = 1.0, *Radius_a* = 20, *Radius_b* = 400, *Contrast* = 3e-6 |Ang^-2|,
2132and *Background* = 0.01 |cm^-1|.
2133
2134Averaging over a distribution of orientation is done by evaluating the equation above. Since we have no other software
2135to compare the implementation of the intensity for fully oriented ellipsoids, we can compare the result of averaging
2136our 2D output using a uniform distribution *p(*\ |theta|,\ |phi|\ *)* = 1.0. Figure 2 shows the result of such a
2137cross-check.
2138
2139.. image:: ..\img\olddocs\image124.jpg
2140
2141*Figure 2: Comparison of the intensity for uniformly distributed ellipsoids calculated from our 2D model and the*
2142*intensity from the NIST SANS analysis software.* The parameters used were: *Scale* = 1.0, *Radius_a* = 20,
2143*Radius_b* = 400, *Contrast* = 3e-6 |Ang^-2|, and *Background* = 0.0 |cm^-1|.
2144
2145The discrepancy above *q* = 0.3 |cm^-1| is due to the way the form factors are calculated in the c-library provided by
2146NIST. A numerical integration has to be performed to obtain *P(q)* for randomly oriented particles. The NIST software
2147performs that integration with a 76-point Gaussian quadrature rule, which will become imprecise at high q where the
2148amplitude varies quickly as a function of *q*. The SasView result shown has been obtained by summing over 501
2149equidistant points in . Our result was found to be stable over the range of *q* shown for a number of points higher
2150than 500.
2151
2152REFERENCE
2153
2154L A Feigin and D I Svergun. *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum,
2155New York, 1987.
2156
2157
2158
2159.. _CoreShellEllipsoidModel:
2160
2161**2.1.26. CoreShellEllipsoidModel**
2162
2163This model provides the form factor, *P(q)*, for a core shell ellipsoid (below) where the form factor is normalized by
2164the volume of the cylinder.
2165
2166*P(q)* = *scale* \* <*f*\ :sup:`2`> / *V* + *background*
2167
2168where the volume *V* = (4/3)\ |pi| (*r*\ :sub:`maj` *r*\ :sub:`min`\ :sup:`2`) and the averaging < > is applied over
2169all orientations for 1D.
2170
2171.. image:: ..\img\olddocs\image125.gif
2172
2173The returned value is in units of |cm^-1|, on absolute scale.
2174
2175*2.1.26.1. Definition*
2176
2177The form factor calculated is
2178
2179.. image:: ..\img\olddocs\image126.PNG
2180
2181To provide easy access to the orientation of the core-shell ellipsoid, we define the axis of the solid ellipsoid using
2182two angles |theta| and |phi|\ . These angles are defined on Figure 2 of the CylinderModel_. The contrast is defined as
2183SLD(core) - SLD(shell) and SLD(shell) - SLD(solvent).
2184
2185In the parameters, *equat_core* = equatorial core radius, *polar_core* = polar core radius, *equat_shell* =
2186*r*\ :sub:`min` (or equatorial outer radius), and *polar_shell* = = *r*\ :sub:`maj` (or polar outer radius).
2187
2188NB: The 2nd virial coefficient of the solid ellipsoid is calculated based on the *radius_a* (= *polar_shell*) and
2189*radius_b* (= *equat_shell*) values, and used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
2190
2191==============  ========  =============
2192Parameter name  Units     Default value
2193==============  ========  =============
2194background      |cm^-1|   0.001
2195equat_core      |Ang|     200
2196equat_shell     |Ang|     250
2197sld_solvent     |Ang^-2|  6e-06
2198ploar_shell     |Ang|     30
2199ploar_core      |Ang|     20
2200scale           None      1
2201sld_core        |Ang^-2|  2e-06
2202sld_shell       |Ang^-2|  1e-06
2203==============  ========  =============
2204
2205.. image:: ..\img\olddocs\image127.jpg
2206
2207*Figure. 1D plot using the default values (w/1000 data point).*
2208
2209.. image:: ..\img\olddocs\image122.jpg
2210
2211*Figure. The angles for oriented CoreShellEllipsoid.*
2212
2213Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2214(Kline, 2006).
2215
2216REFERENCE
2217
2218M Kotlarchyk, S H Chen, *J. Chem. Phys.*, 79 (1983) 2461
2219
2220S J Berr, *Phys. Chem.*, 91 (1987) 4760
2221
2222
2223
2224.. _CoreShellEllipsoidXTModel:
2225
2226**2.1.27. CoreShellEllipsoidXTModel**
2227
2228An alternative version of *P(q)* for the core-shell ellipsoid (see CoreShellEllipsoidModel), having as parameters the
2229core axial ratio *X* and a shell thickness, which are more often what we would like to determine.
2230
2231This model is also better behaved when polydispersity is applied than the four independent radii in
2232CoreShellEllipsoidModel.
2233
2234*2.1.27.1. Definition*
2235
2236.. image:: ..\img\olddocs\image125.gif
2237
2238The geometric parameters of this model are
2239
2240  *equat_core* = equatorial core radius = *Rminor_core*
2241 
2242  *X_core* = *polar_core* / *equat_core* = *Rmajor_core* / *Rminor_core*
2243 
2244  *T_shell* = *equat_outer* - *equat_core* = *Rminor_outer* - *Rminor_core*
2245 
2246  *XpolarShell* = *Tpolar_shell* / *T_shell* = (*Rmajor_outer* - *Rmajor_core*)/(*Rminor_outer* - *Rminor_core*)
2247
2248In terms of the original radii
2249
2250  *polar_core* = *equat_core* \* *X_core*
2251 
2252  *equat_shell* = *equat_core* + *T_shell*
2253 
2254  *polar_shell* = *equat_core* \* *X_core* + *T_shell* \* *XpolarShell*
2255
2256  (where we note that "shell" perhaps confusingly, relates to the outer radius)
2257
2258When *X_core* < 1 the core is oblate; when *X_core* > 1  it is prolate. *X_core* = 1 is a spherical core.
2259
2260For a fixed shell thickness *XpolarShell* = 1, to scale the shell thickness pro-rata with the radius
2261*XpolarShell* = *X_core*.
2262
2263When including an *S(q)*, the radius in *S(q)* is calculated to be that of a sphere with the same 2nd virial
2264coefficient of the **outer** surface of the ellipsoid. This may have some undesirable effects if the aspect ratio of
2265the ellipsoid is large (ie, if *X* << 1 or *X* >> 1), when the *S(q)* - which assumes spheres - will not in any case
2266be valid.
2267
2268If SAS data are in absolute units, and the SLDs are correct, then *scale* should be the total volume fraction of the
2269"outer particle". When *S(q)* is introduced this moves to the *S(q)* volume fraction, and *scale* should then be 1.0,
2270or contain some other units conversion factor (for example, if you have SAXS data).
2271
2272==============  ========  =============
2273Parameter name  Units     Default value
2274==============  ========  =============
2275background      |cm^-1|   0.001
2276equat_core      |Ang|     20
2277scale           None      0.05
2278sld_core        |Ang^-2|  2.0e-6
2279sld_shell       |Ang^-2|  1.0e-6
2280sld_solv        |Ang^-2|  6.3e-6
2281T_shell         |Ang|     30
2282X_core          None      3.0
2283XpolarShell     None      1.0
2284==============  ========  =============
2285
2286REFERENCE
2287
2288R K Heenan, Private communication
2289
2290
2291
2292.. _TriaxialEllipsoidModel:
2293
2294**2.1.28. TriaxialEllipsoidModel**
2295
2296This model provides the form factor, *P(q)*, for an ellipsoid (below) where all three axes are of different lengths,
2297i.e., *Ra* =< *Rb* =< *Rc*\ . **Users should maintain this inequality for all calculations**.
2298
2299*P(q)* = *scale* \* <*f*\ :sup:`2`> / *V* + *background*
2300
2301where the volume *V* = (4/3)\ |pi| (*Ra* *Rb* *Rc*), and the averaging < > is applied over all orientations for 1D.
2302
2303.. image:: ..\img\olddocs\image128.jpg
2304
2305The returned value is in units of |cm^-1|, on absolute scale.
2306
2307*2.1.28.1. Definition*
2308
2309The form factor calculated is
2310
2311.. image:: ..\img\olddocs\image129.PNG
2312
2313To provide easy access to the orientation of the triaxial ellipsoid, we define the axis of the cylinder using the
2314angles |theta|, |phi| and |bigpsi|. These angles are defined on Figure 2 of the CylinderModel_. The angle |bigpsi| is
2315the rotational angle around its own *semi_axisC* axis against the *q* plane. For example, |bigpsi| = 0 when the
2316*semi_axisA* axis is parallel to the *x*-axis of the detector.
2317
2318The radius-of-gyration for this system is *Rg*\ :sup:`2` = (*Ra*\ :sup:`2` *Rb*\ :sup:`2` *Rc*\ :sup:`2`)/5.
2319
2320The contrast is defined as SLD(ellipsoid) - SLD(solvent). In the parameters, *semi_axisA* = *Ra* (or minor equatorial
2321radius), *semi_axisB* = *Rb* (or major equatorial radius), and *semi_axisC* = *Rc* (or polar radius of the ellipsoid).
2322
2323NB: The 2nd virial coefficient of the triaxial solid ellipsoid is calculated based on the
2324*radius_a* (= *semi_axisC*\ ) and *radius_b* (= sqrt(*semi_axisA* \* *semi_axisB*)) values, and used as the effective
2325radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
2326
2327==============  ========  =============
2328Parameter name  Units     Default value
2329==============  ========  =============
2330background      |cm^-1|   0.0
2331semi_axisA      |Ang|     35
2332semi_axisB      |Ang|     100
2333semi_axisC      |Ang|     400
2334scale           None      1
2335sldEll          |Ang^-2|  1.0e-06
2336sldSolv         |Ang^-2|  6.3e-06
2337==============  ========  =============
2338
2339.. image:: ..\img\olddocs\image130.jpg
2340
2341*Figure. 1D plot using the default values (w/1000 data point).*
2342
2343*2.1.28.2.Validation of the TriaxialEllipsoidModel*
2344
2345Validation of our code was done by comparing the output of the 1D calculation to the angular average of the output of
23462D calculation over all possible angles. The Figure below shows the comparison where the solid dot refers to averaged
23472D while the line represents the result of 1D calculation (for 2D averaging, 76, 180, and 76 points are taken for the
2348angles of |theta|, |phi|, and |psi| respectively).
2349
2350.. image:: ..\img\olddocs\image131.gif
2351
2352*Figure. Comparison between 1D and averaged 2D.*
2353
2354.. image:: ..\img\olddocs\image132.jpg
2355
2356*Figure. The angles for oriented ellipsoid.*
2357
2358Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2359(Kline, 2006)
2360
2361REFERENCE
2362
2363L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum,
2364New York, 1987.
2365
2366
2367
2368.. _LamellarModel:
2369
2370**2.1.29. LamellarModel**
2371
2372This model provides the scattering intensity, *I(q)*, for a lyotropic lamellar phase where a uniform SLD and random
2373distribution in solution are assumed. Polydispersity in the bilayer thickness can be applied from the GUI.
2374
2375*2.1.29.1. Definition*
2376
2377The scattering intensity *I(q)* is
2378
2379.. image:: ..\img\olddocs\image133.PNG
2380
2381The form factor is
2382
2383.. image:: ..\img\olddocs\image134.PNG
2384
2385where |delta| = bilayer thickness.
2386
2387The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
2388
2389.. image:: ..\img\olddocs\image040.gif
2390
2391The returned value is in units of |cm^-1|, on absolute scale. In the parameters, *sld_bi* = SLD of the bilayer,
2392*sld_sol* = SLD of the solvent, and *bi_thick* = thickness of the bilayer.
2393
2394==============  ========  =============
2395Parameter name  Units     Default value
2396==============  ========  =============
2397background      |cm^-1|   0.0
2398sld_bi          |Ang^-2|  1e-06
2399bi_thick        |Ang|     50
2400sld_sol         |Ang^-2|  6e-06
2401scale           None      1
2402==============  ========  =============
2403
2404.. image:: ..\img\olddocs\image135.jpg
2405
2406*Figure. 1D plot using the default values (w/1000 data point).*
2407
2408Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2409(Kline, 2006).
2410
2411REFERENCE
2412
2413F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
2414
2415also in J. Phys. Chem. B, 105, (2001) 11081-11088
2416
2417
2418
2419.. _LamellarFFHGModel:
2420
2421**2.1.30. LamellarFFHGModel**
2422
2423This model provides the scattering intensity, *I(q)*, for a lyotropic lamellar phase where a random distribution in
2424solution are assumed. The SLD of the head region is taken to be different from the SLD of the tail region.
2425
2426*2.1.31.1. Definition*
2427
2428The scattering intensity *I(q)* is
2429
2430.. image:: ..\img\olddocs\image136.PNG
2431
2432The form factor is
2433
2434.. image:: ..\img\olddocs\image137.jpg
2435
2436where |delta|\ T = tail length (or *t_length*), |delta|\ H = head thickness (or *h_thickness*),
2437|drho|\ H = SLD(headgroup) - SLD(solvent), and |drho|\ T = SLD(tail) - SLD(solvent). The total thickness is 2(H+T).
2438
2439The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
2440
2441.. image:: ..\img\olddocs\image040.gif
2442
2443The returned value is in units of |cm^-1|, on absolute scale. In the parameters, *sld_tail* = SLD of the tail group,
2444and *sld_head* = SLD of the head group.
2445
2446==============  ========  =============
2447Parameter name  Units     Default value
2448==============  ========  =============
2449background      |cm^-1|   0.0
2450sld_head        |Ang^-2|  3e-06
2451scale           None      1
2452sld_solvent     |Ang^-2|  6e-06
2453h_thickness     |Ang|     10
2454t_length        |Ang|     15
2455sld_tail        |Ang^-2|  0
2456==============  ========  =============
2457
2458.. image:: ..\img\olddocs\image138.jpg
2459
2460*Figure. 1D plot using the default values (w/1000 data point).*
2461
2462Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2463(Kline, 2006).
2464
2465REFERENCE
2466
2467F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
2468
2469also in J. Phys. Chem. B, 105, (2001) 11081-11088
2470
2471*2014/04/17 - Description reviewed by S King and P Butler.*
2472
2473
2474
2475.. _LamellarPSModel:
2476
2477**2.1.31. LamellarPSModel**
2478
2479This model provides the scattering intensity, *I(q)* = *P(q)* \* *S(q)*, for a lyotropic lamellar phase where a random
2480distribution in solution are assumed.
2481
2482*2.1.31.1. Definition*
2483
2484The scattering intensity *I(q)* is
2485
2486.. image:: ..\img\olddocs\image139.PNG
2487
2488The form factor is
2489
2490.. image:: ..\img\olddocs\image134.PNG
2491
2492and the structure factor is
2493
2494.. image:: ..\img\olddocs\image140.PNG
2495
2496where
2497
2498.. image:: ..\img\olddocs\image141.PNG
2499
2500Here *d* = (repeat) spacing, |delta| = bilayer thickness, the contrast |drho| = SLD(headgroup) - SLD(solvent),
2501K = smectic bending elasticity, B = compression modulus, and N = number of lamellar plates (*n_plates*).
2502
2503NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the assumptions of the model are incorrect.**
2504And due to a complication of the model function, users are responsible for making sure that all the assumptions are
2505handled accurately (see the original reference below for more details).
2506
2507The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
2508
2509.. image:: ..\img\olddocs\image040.gif
2510
2511The returned value is in units of |cm^-1|, on absolute scale.
2512
2513==============  ========  =============
2514Parameter name  Units     Default value
2515==============  ========  =============
2516background      |cm^-1|   0.0
2517contrast        |Ang^-2|  5e-06
2518scale           None      1
2519delta           |Ang|     30
2520n_plates        None      20
2521spacing         |Ang|     400
2522caille          |Ang^-2|  0.1
2523==============  ========  =============
2524
2525.. image:: ..\img\olddocs\image142.jpg
2526
2527*Figure. 1D plot using the default values (w/6000 data point).*
2528
2529Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2530(Kline, 2006).
2531
2532REFERENCE
2533
2534F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
2535
2536also in J. Phys. Chem. B, 105, (2001) 11081-11088
2537
2538
2539
2540.. _LamellarPSHGModel:
2541
2542**2.1.32. LamellarPSHGModel**
2543
2544This model provides the scattering intensity, *I(q)* = *P(q)* \* *S(q)*, for a lyotropic lamellar phase where a random
2545distribution in solution are assumed. The SLD of the head region is taken to be different from the SLD of the tail
2546region.
2547
2548*2.1.32.1. Definition*
2549
2550The scattering intensity *I(q)* is
2551
2552.. image:: ..\img\olddocs\image139.PNG
2553
2554The form factor is
2555
2556.. image:: ..\img\olddocs\image143.PNG
2557
2558The structure factor is
2559
2560.. image:: ..\img\olddocs\image140.PNG
2561
2562where
2563
2564.. image:: ..\img\olddocs\image141.PNG
2565
2566where |delta|\ T = tail length (or *t_length*), |delta|\ H = head thickness (or *h_thickness*),
2567|drho|\ H = SLD(headgroup) - SLD(solvent), and |drho|\ T = SLD(tail) - SLD(headgroup).
2568Here *d* = (repeat) spacing, *K* = smectic bending elasticity, *B* = compression modulus, and N = number of lamellar
2569plates (*n_plates*).
2570
2571NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the assumptions of the model are incorrect.**
2572And due to a complication of the model function, users are responsible for making sure that all the assumptions are
2573handled accurately (see the original reference below for more details).
2574
2575The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
2576
2577.. image:: ..\img\olddocs\image040.gif
2578
2579The returned value is in units of |cm^-1|, on absolute scale. In the parameters, *sld_tail* = SLD of the tail group,
2580*sld_head* = SLD of the head group, and *sld_solvent* = SLD of the solvent.
2581
2582==============  ========  =============
2583Parameter name  Units     Default value
2584==============  ========  =============
2585background      |cm^-1|   0.001
2586sld_head        |Ang^-2|  2e-06
2587scale           None      1
2588sld_solvent     |Ang^-2|  6e-06
2589deltaH          |Ang|     2
2590deltaT          |Ang|     10
2591sld_tail        |Ang^-2|  0
2592n_plates        None      30
2593spacing         |Ang|     40
2594caille          |Ang^-2|  0.001
2595==============  ========  =============
2596
2597.. image:: ..\img\olddocs\image144.jpg
2598
2599*Figure. 1D plot using the default values (w/6000 data point).*
2600
2601Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2602(Kline, 2006).
2603
2604REFERENCE
2605
2606F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
2607
2608also in J. Phys. Chem. B, 105, (2001) 11081-11088
2609
2610
2611
2612.. _LamellarPCrystalModel:
2613
2614**2.1.33. LamellarPCrystalModel**
2615
2616This model calculates the scattering from a stack of repeating lamellar structures. The stacks of lamellae (infinite
2617in lateral dimension) are treated as a paracrystal to account for the repeating spacing. The repeat distance is further
2618characterized by a Gaussian polydispersity. **This model can be used for large multilamellar vesicles.**
2619
2620*2.1.33.1. Definition*
2621
2622The scattering intensity *I(q)* is calculated as
2623
2624.. image:: ..\img\olddocs\image145.jpg
2625
2626The form factor of the bilayer is approximated as the cross section of an infinite, planar bilayer of thickness *t*
2627
2628.. image:: ..\img\olddocs\image146.jpg
2629
2630Here, the scale factor is used instead of the mass per area of the bilayer (*G*). The scale factor is the volume
2631fraction of the material in the bilayer, *not* the total excluded volume of the paracrystal. *Z*\ :sub:`N`\ *(q)*
2632describes the interference effects for aggregates consisting of more than one bilayer. The equations used are (3-5)
2633from the Bergstrom reference below.
2634
2635Non-integer numbers of stacks are calculated as a linear combination of the lower and higher values
2636
2637.. image:: ..\img\olddocs\image147.jpg
2638
2639The 2D scattering intensity is the same as 1D, regardless of the orientation of the *q* vector which is defined as
2640
2641.. image:: ..\img\olddocs\image040.gif
2642
2643The parameters of the model are *Nlayers* = no. of layers, and *pd_spacing* = polydispersity of spacing.
2644
2645==============  ========  =============
2646Parameter name  Units     Default value
2647==============  ========  =============
2648background      |cm^-1|   0
2649scale           None      1
2650Nlayers         None      20
2651pd_spacing      None      0.2
2652sld_layer       |Ang^-2|  1e-6
2653sld_solvent     |Ang^-2|  6.34e-6
2654spacing         |Ang|     250
2655thickness       |Ang|     33
2656==============  ========  =============
2657
2658.. image:: ..\img\olddocs\image148.jpg
2659
2660*Figure. 1D plot using the default values above (w/20000 data point).*
2661
2662Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
2663(Kline, 2006).
2664
2665REFERENCE
2666
2667M Bergstrom, J S Pedersen, P Schurtenberger, S U Egelhaaf, *J. Phys. Chem. B*, 103 (1999) 9888-9897
2668
2669
2670
2671.. _SCCrystalModel:
2672
2673**2.1.34. SCCrystalModel**
2674
2675Calculates the scattering from a **simple cubic lattice** with paracrystalline distortion. Thermal vibrations are
2676considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is assumed
2677to be isotropic and characterized by a Gaussian distribution.
2678
2679The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
2680
2681*2.1.34.1. Definition*
2682
2683The scattering intensity *I(q)* is calculated as
2684
2685.. image:: ..\img\olddocs\image149.jpg
2686
2687where *scale* is the volume fraction of spheres, *Vp* is the volume of the primary particle, *V(lattice)* is a volume
2688correction for the crystal structure, *P(q)* is the form factor of the sphere (normalized), and *Z(q)* is the
2689paracrystalline structure factor for a simple cubic structure.
2690
2691Equation (16) of the 1987 reference is used to calculate *Z(q)*, using equations (13)-(15) from the 1987 paper for
2692*Z1*\ , *Z2*\ , and *Z3*\ .
2693
2694The lattice correction (the occupied volume of the lattice) for a simple cubic structure of particles of radius *R*
2695and nearest neighbor separation *D* is
2696
2697.. image:: ..\img\olddocs\image150.jpg
2698
2699The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)*
2700
2701.. image:: ..\img\olddocs\image151.jpg
2702
2703where *g* is a fractional distortion based on the nearest neighbor distance.
2704
2705The simple cubic lattice is
2706
2707.. image:: ..\img\olddocs\image152.jpg
2708
2709For a crystal, diffraction peaks appear at reduced *q*\ -values given by
2710
2711.. image:: ..\img\olddocs\image153.jpg
2712
2713where for a simple cubic lattice any *h*\ , *k*\ , *l* are allowed and none are forbidden. Thus the peak positions
2714correspond to (just the first 5)
2715
2716.. image:: ..\img\olddocs\image154.jpg
2717
2718**NB: The calculation of** *Z(q)* **is a double numerical integral that must be carried out with a high density of**
2719**points to properly capture the sharp peaks of the paracrystalline scattering.** So be warned that the calculation is
2720SLOW. Go get some coffee. Fitting of any experimental data must be resolution smeared for any meaningful fit. This
2721makes a triple integral. Very, very slow. Go get lunch!
2722
2723==============  ========  =============
2724Parameter name  Units     Default value
2725==============  ========  =============
2726background      |cm^-1|   0
2727dnn             |Ang|     220
2728scale           None      1
2729sldSolv         |Ang^-2|  6.3e-06
2730radius          |Ang|     40
2731sld_Sph         |Ang^-2|  3e-06
2732d_factor        None      0.06
2733==============  ========  =============
2734
2735This example dataset is produced using 200 data points, *qmin* = 0.01 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above
2736default values.
2737
2738.. image:: ..\img\olddocs\image155.jpg
2739
2740*Figure. 1D plot in the linear scale using the default values (w/200 data point).*
2741
2742The 2D (Anisotropic model) is based on the reference below where *I(q)* is approximated for 1d scattering. Thus the
2743scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model
2744computation.
2745
2746.. image:: ..\img\olddocs\image156.jpg
2747
2748.. image:: ..\img\olddocs\image157.jpg
2749
2750*Figure. 2D plot using the default values (w/200X200 pixels).*
2751
2752REFERENCE
2753
2754Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765
2755(Original Paper)
2756
2757Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856
2758(Corrections to FCC and BCC lattice structure calculation)
2759
2760
2761
2762.. _FCCrystalModel:
2763
2764**2.1.35. FCCrystalModel**
2765
2766Calculates the scattering from a **face-centered cubic lattice** with paracrystalline distortion. Thermal vibrations
2767are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is
2768assumed to be isotropic and characterized by a Gaussian distribution.
2769
2770The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
2771
2772*2.1.35.1. Definition*
2773
2774The scattering intensity *I(q)* is calculated as
2775
2776.. image:: ..\img\olddocs\image158.jpg
2777
2778where *scale* is the volume fraction of spheres, *Vp* is the volume of the primary particle, *V(lattice)* is a volume
2779correction for the crystal structure, *P(q)* is the form factor of the sphere (normalized), and *Z(q)* is the
2780paracrystalline structure factor for a face-centered cubic structure.
2781
2782Equation (1) of the 1990 reference is used to calculate *Z(q)*, using equations (23)-(25) from the 1987 paper for
2783*Z1*\ , *Z2*\ , and *Z3*\ .
2784
2785The lattice correction (the occupied volume of the lattice) for a face-centered cubic structure of particles of radius
2786*R* and nearest neighbor separation *D* is
2787
2788.. image:: ..\img\olddocs\image159.jpg
2789
2790The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)*
2791
2792.. image:: ..\img\olddocs\image160.jpg
2793
2794where *g* is a fractional distortion based on the nearest neighbor distance.
2795
2796The face-centered cubic lattice is
2797
2798.. image:: ..\img\olddocs\image161.jpg
2799
2800For a crystal, diffraction peaks appear at reduced q-values given by
2801
2802.. image:: ..\img\olddocs\image162.jpg
2803
2804where for a face-centered cubic lattice *h*\ , *k*\ , *l* all odd or all even are allowed and reflections where
2805*h*\ , *k*\ , *l* are mixed odd/even are forbidden. Thus the peak positions correspond to (just the first 5)
2806
2807.. image:: ..\img\olddocs\image163.jpg
2808
2809**NB: The calculation of** *Z(q)* **is a double numerical integral that must be carried out with a high density of**
2810**points to properly capture the sharp peaks of the paracrystalline scattering.** So be warned that the calculation is
2811SLOW. Go get some coffee. Fitting of any experimental data must be resolution smeared for any meaningful fit. This
2812makes a triple integral. Very, very slow. Go get lunch!
2813
2814==============  ========  =============
2815Parameter name  Units     Default value
2816==============  ========  =============
2817background      |cm^-1|   0
2818dnn             |Ang|     220
2819scale           None      1
2820sldSolv         |Ang^-2|  6.3e-06
2821radius          |Ang|     40
2822sld_Sph         |Ang^-2|  3e-06
2823d_factor        None      0.06
2824==============  ========  =============
2825
2826This example dataset is produced using 200 data points, *qmin* = 0.01 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above
2827default values.
2828
2829.. image:: ..\img\olddocs\image164.jpg
2830
2831*Figure. 1D plot in the linear scale using the default values (w/200 data point).*
2832
2833The 2D (Anisotropic model) is based on the reference below where *I(q)* is approximated for 1d scattering. Thus the
2834scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model
2835computation.
2836
2837.. image:: ..\img\olddocs\image165.gif
2838
2839.. image:: ..\img\olddocs\image166.jpg
2840
2841*Figure. 2D plot using the default values (w/200X200 pixels).*
2842
2843REFERENCE
2844
2845Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765
2846(Original Paper)
2847
2848Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856
2849(Corrections to FCC and BCC lattice structure calculation)
2850
2851
2852
2853.. _BCCrystalModel:
2854
2855**2.1.36. BCCrystalModel**
2856
2857Calculates the scattering from a **body-centered cubic lattice** with paracrystalline distortion. Thermal vibrations
2858are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is
2859assumed to be isotropic and characterized by a Gaussian distribution.
2860
2861The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale.
2862
2863*2.1.36.1. Definition**
2864
2865The scattering intensity *I(q)* is calculated as
2866
2867.. image:: ..\img\olddocs\image167.jpg
2868
2869where *scale* is the volume fraction of spheres, *Vp* is the volume of the primary particle, *V(lattice)* is a volume
2870correction for the crystal structure, *P(q)* is the form factor of the sphere (normalized), and *Z(q)* is the
2871paracrystalline structure factor for a body-centered cubic structure.
2872
2873Equation (1) of the 1990 reference is used to calculate *Z(q)*, using equations (29)-(31) from the 1987 paper for
2874*Z1*\ , *Z2*\ , and *Z3*\ .
2875
2876The lattice correction (the occupied volume of the lattice) for a body-centered cubic structure of particles of radius
2877*R* and nearest neighbor separation *D* is
2878
2879.. image:: ..\img\olddocs\image159.jpg
2880
2881The distortion factor (one standard deviation) of the paracrystal is included in the calculation of *Z(q)*
2882
2883.. image:: ..\img\olddocs\image160.jpg
2884
2885where *g* is a fractional distortion based on the nearest neighbor distance.
2886
2887The body-centered cubic lattice is
2888
2889.. image:: ..\img\olddocs\image168.jpg
2890
2891For a crystal, diffraction peaks appear at reduced q-values given by
2892
2893.. image:: ..\img\olddocs\image162.jpg
2894
2895where for a body-centered cubic lattice, only reflections where (\ *h* + *k* + *l*\ ) = even are allowed and
2896reflections where (\ *h* + *k* + *l*\ ) = odd are forbidden. Thus the peak positions correspond to (just the first 5)
2897
2898.. image:: ..\img\olddocs\image169.jpg
2899
2900**NB: The calculation of** *Z(q)* **is a double numerical integral that must be carried out with a high density of**
2901**points to properly capture the sharp peaks of the paracrystalline scattering.** So be warned that the calculation is
2902SLOW. Go get some coffee. Fitting of any experimental data must be resolution smeared for any meaningful fit. This
2903makes a triple integral. Very, very slow. Go get lunch!
2904
2905==============  ========  =============
2906Parameter name  Units     Default value
2907==============  ========  =============
2908background      |cm^-1|   0
2909dnn             |Ang|     220
2910scale           None      1
2911sldSolv         |Ang^-2|  6.3e-006
2912radius          |Ang|     40
2913sld_Sph         |Ang^-2|  3e-006
2914d_factor        None      0.06
2915==============  ========  =============
2916
2917This example dataset is produced using 200 data points, *qmin* = 0.001 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above
2918default values.
2919
2920.. image:: ..\img\olddocs\image170.jpg
2921
2922*Figure. 1D plot in the linear scale using the default values (w/200 data point).*
2923
2924The 2D (Anisotropic model) is based on the reference below where *I(q)* is approximated for 1d scattering. Thus the
2925scattering pattern for 2D may not be accurate. Note that we are not responsible for any incorrectness of the 2D model
2926computation.
2927
2928.. image:: ..\img\olddocs\image165.gif
2929
2930.. image:: ..\img\olddocs\image171.jpg
2931
2932*Figure. 2D plot using the default values (w/200X200 pixels).*
2933
2934REFERENCE
2935
2936Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765
2937(Original Paper)
2938
2939Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856
2940(Corrections to FCC and BCC lattice structure calculation)
2941
2942
2943
2944.. _ParallelepipedModel:
2945
2946**2.1.37. ParallelepipedModel**
2947
2948This model provides the form factor, *P(q)*, for a rectangular cylinder (below) where the form factor is normalized by
2949the volume of the cylinder. If you need to apply polydispersity, see the RectangularPrismModel_.
2950
2951*P(q)* = *scale* \* <*f*\ :sup:`2`> / *V* + *background*
2952
2953where the volume *V* = *A B C* and the averaging < > is applied over all orientations for 1D.
2954
2955For information about polarised and magnetic scattering, click here_.
2956
2957.. image:: ..\img\olddocs\image087.jpg
2958
2959*2.1.37.1. Definition*
2960
2961**The edge of the solid must satisfy the condition that** *A* < *B*. Then, assuming *a* = *A* / *B* < 1,
2962*b* = *B* / *B* = 1, and *c* = *C* / *B* > 1, the form factor is
2963
2964.. image:: ..\img\olddocs\image088.PNG
2965
2966and the contrast is defined as
2967
2968.. image:: ..\img\olddocs\image089.PNG
2969
2970The scattering intensity per unit volume is returned in units of |cm^-1|; ie, *I(q)* = |phi| *P(q)*\ .
2971
2972NB: The 2nd virial coefficient of the parallelpiped is calculated based on the the averaged effective radius
2973(= sqrt(*short_a* \* *short_b* / |pi|)) and length(= *long_c*) values, and used as the effective radius for
2974*S(Q)* when *P(Q)* \* *S(Q)* is applied.
2975
2976To provide easy access to the orientation of the parallelepiped, we define the axis of the cylinder using three angles
2977|theta|, |phi| and |bigpsi|. These angles are defined on Figure 2 of the CylinderModel_. The angle |bigpsi| is the
2978rotational angle around the *long_c* axis against the *q* plane. For example, |bigpsi| = 0 when the *short_b* axis is
2979parallel to the *x*-axis of the detector.
2980
2981.. image:: ..\img\olddocs\image090.jpg
2982
2983*Figure. Definition of angles for 2D*.
2984
2985.. image:: ..\img\olddocs\image091.jpg
2986
2987*Figure. Examples of the angles for oriented pp against the detector plane.*
2988
2989==============  ========  =============
2990Parameter name  Units     Default value
2991==============  ========  =============
2992background      |cm^-1|   0.0
2993contrast        |Ang^-2|  5e-06
2994long_c          |Ang|     400
2995short_a         |Ang^-2|  35
2996short_b         |Ang|     75
2997scale           None      1
2998==============  ========  =============
2999
3000.. image:: ..\img\olddocs\image092.jpg
3001
3002*Figure. 1D plot using the default values (w/1000 data point).*
3003
3004*2.1.37.2. Validation of the parallelepiped 2D model*
3005
3006Validation of our code was done by comparing the output of the 1D calculation to the angular average of the output of
3007a 2D calculation over all possible angles. The Figure below shows the comparison where the solid dot refers to averaged
30082D while the line represents the result of the 1D calculation (for the averaging, 76, 180, 76 points are taken for the
3009angles of |theta|, |phi|, and |psi| respectively).
3010
3011.. image:: ..\img\olddocs\image093.gif
3012
3013*Figure. Comparison between 1D and averaged 2D.*
3014
3015Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
3016(Kline, 2006).
3017
3018REFERENCE
3019
3020P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211
3021Equations (1), (13-14). (in German)
3022
3023
3024
3025.. _CSParallelepipedModel:
3026
3027**2.1.38. CSParallelepipedModel**
3028
3029Calculates the form factor for a rectangular solid with a core-shell structure. **The thickness and the scattering**
3030**length density of the shell or "rim" can be different on all three (pairs) of faces.**
3031
3032The form factor is normalized by the particle volume *V* such that
3033
3034*P(q)* = *scale* \* <*f*\ :sup:`2`> / *V* + *background*
3035
3036where < > is an average over all possible orientations of the rectangular solid.
3037
3038An instrument resolution smeared version of the model is also provided.
3039
3040*2.1.38.1. Definition*
3041
3042The function calculated is the form factor of the rectangular solid below. The core of the solid is defined by the
3043dimensions *A*, *B*, *C* such that *A* < *B* < *C*.
3044
3045.. image:: ..\img\olddocs\image087.jpg
3046
3047There are rectangular "slabs" of thickness *tA* that add to the *A* dimension (on the *BC* faces). There are similar
3048slabs on the *AC* (= *tB*) and *AB* (= *tC*) faces. The projection in the *AB* plane is then
3049
3050.. image:: ..\img\olddocs\image094.jpg
3051
3052The volume of the solid is
3053
3054.. image:: ..\img\olddocs\image095.PNG
3055
3056**meaning that there are "gaps" at the corners of the solid.**
3057
3058The intensity calculated follows the ParallelepipedModel_, with the core-shell intensity being calculated as the
3059square of the sum of the amplitudes of the core and shell, in the same manner as a CoreShellModel_.
3060
3061**For the calculation of the form factor to be valid, the sides of the solid MUST be chosen such that** *A* < *B* < *C*.
3062**If this inequality is not satisfied, the model will not report an error, and the calculation will not be correct.**
3063
3064FITTING NOTES
3065If the scale is set equal to the particle volume fraction, |phi|, the returned value is the scattered intensity per
3066unit volume; ie, *I(q)* = |phi| *P(q)*\ . However, **no interparticle interference effects are included in this**
3067**calculation.**
3068
3069There are many parameters in this model. Hold as many fixed as possible with known values, or you will certainly end
3070up at a solution that is unphysical.
3071
3072Constraints must be applied during fitting to ensure that the inequality *A* < *B* < *C* is not violated. The
3073calculation will not report an error, but the results will not be correct.
3074
3075The returned value is in units of |cm^-1|, on absolute scale.
3076
3077NB: The 2nd virial coefficient of the CSParallelpiped is calculated based on the the averaged effective radius
3078(= sqrt((*short_a* + 2 *rim_a*) \* (*short_b* + 2 *rim_b*) / |pi|)) and length(= *long_c* + 2 *rim_c*) values, and
3079used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied.
3080
3081To provide easy access to the orientation of the parallelepiped, we define the axis of the cylinder using three angles
3082|theta|, |phi| and |bigpsi|. These angles are defined on Figure 2 of the CylinderModel_. The angle |bigpsi| is the
3083rotational angle around the *long_c* axis against the *q* plane. For example, |bigpsi| = 0 when the *short_b* axis is
3084parallel to the *x*-axis of the detector.
3085
3086.. image:: ..\img\olddocs\image090.jpg
3087
3088*Figure. Definition of angles for 2D*.
3089
3090.. image:: ..\img\olddocs\image091.jpg
3091
3092*Figure. Examples of the angles for oriented cspp against the detector plane.*
3093
3094This example dataset was produced by running the Macro Plot_CSParallelepiped(), using 100 data points,
3095*qmin* = 0.001 |Ang^-1|, *qmax* = 0.7 |Ang^-1| and the default values
3096
3097==============  ========  =============
3098Parameter name  Units     Default value
3099==============  ========  =============
3100background      |cm^-1|   0.06
3101sld_pcore       |Ang^-2|  1e-06
3102sld_rimA        |Ang^-2|  2e-06
3103sld_rimB        |Ang^-2|  4e-06
3104sld_rimC        |Ang^-2|  2e-06
3105sld_solv        |Ang^-2|  6e-06
3106rimA            |Ang|     10
3107rimB            |Ang|     10
3108rimC            |Ang|     10
3109longC           |Ang|     400
3110shortA          |Ang|     35
3111midB            |Ang|     75
3112scale           None      1
3113==============  ========  =============
3114
3115.. image:: ..\img\olddocs\image096.jpg
3116
3117*Figure. 1D plot using the default values (w/256 data points).*
3118
3119.. image:: ..\img\olddocs\image097.jpg
3120
3121*Figure. 2D plot using the default values (w/(256X265) data points).*
3122
3123Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
3124(Kline, 2006).
3125
3126REFERENCE
3127
3128P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211
3129Equations (1), (13-14). (in German)
3130
3131
3132
3133.. _RectangularPrismModel:
3134
3135**2.1.39. RectangularPrismModel**
3136
3137This model provides the form factor, *P(q)*, for a rectangular prism.
3138
3139Note that this model is almost totally equivalent to the existing ParallelepipedModel_. The only difference is that the
3140way the relevant parameters are defined here (*a*, *b/a*, *c/a* instead of *a*, *b*, *c*) allows to use polydispersity
3141with this model while keeping the shape of the prism (e.g. setting *b/a* = 1 and *c/a* = 1 and applying polydispersity
3142to *a* will generate a distribution of cubes of different sizes).
3143
3144*2.1.39.1. Definition*
3145
3146The 1D scattering intensity for this model was calculated by Mittelbach and Porod (Mittelbach, 1961), but the
3147implementation here is closer to the equations given by Nayuk and Huber (Nayuk, 2012).
3148
3149The scattering from a massive parallelepiped with an orientation with respect to the scattering vector given by |theta|
3150and |phi| is given by
3151
3152.. math::
3153  A_P\,(q) =  \frac{\sin \bigl( q \frac{C}{2} \cos\theta \bigr)}{q \frac{C}{2} \cos\theta} \, \times \,
3154  \frac{\sin \bigl( q \frac{A}{2} \sin\theta \sin\phi \bigr)}{q \frac{A}{2} \sin\theta \sin\phi} \, \times \,
3155  \frac{\sin \bigl( q \frac{B}{2} \sin\theta \cos\phi \bigr)}{q \frac{B}{2} \sin\theta \cos\phi}
3156
3157where *A*, *B* and *C* are the sides of the parallelepiped and must fulfill :math:`A \le B \le C`, |theta| is the angle
3158between the *z* axis and the longest axis of the parallelepiped *C*, and |phi| is the angle between the scattering
3159vector (lying in the *xy* plane) and the *y* axis.
3160
3161The normalized form factor in 1D is obtained averaging over all possible orientations
3162
3163.. math::
3164  P(q) =  \frac{2}{\pi} \times \, \int_0^{\frac{\pi}{2}} \, \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi
3165
3166The 1D scattering intensity is then calculated as
3167
3168.. math::
3169  I(q) = \mbox{scale} \times V \times (\rho_{\mbox{pipe}} - \rho_{\mbox{solvent}})^2 \times P(q)
3170
3171where *V* is the volume of the rectangular prism, :math:`\rho_{\mbox{pipe}}` is the scattering length of the
3172parallelepiped, :math:`\rho_{\mbox{solvent}}` is the scattering length of the solvent, and (if the data are in absolute
3173units) *scale* represents the volume fraction (which is unitless).
3174
3175**The 2D scattering intensity is not computed by this model.**
3176
3177The returned value is scaled to units of |cm^-1| and the parameters of the RectangularPrismModel are the following
3178
3179==============  ========  =============
3180Parameter name  Units     Default value
3181==============  ========  =============
3182scale           None      1
3183short_side      |Ang|     35
3184b2a_ratio       None      1
3185c2a_ratio       None      1
3186sldPipe         |Ang^-2|  6.3e-6
3187sldSolv         |Ang^-2|  1.0e-6
3188background      |cm^-1|   0
3189==============  ========  =============
3190
3191*2.1.39.2. Validation of the RectangularPrismModel*
3192
3193Validation of the code was conducted by comparing the output of the 1D model to the output of the existing
3194parallelepiped model.
3195
3196REFERENCES
3197
3198P Mittelbach and G Porod, *Acta Physica Austriaca*, 14 (1961) 185-211
3199
3200R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854
3201
3202
3203
3204.. _RectangularHollowPrismModel:
3205
3206**2.1.40. RectangularHollowPrismModel**
3207
3208This model provides the form factor, *P(q)*, for a hollow rectangular parallelepiped with a wall thickness |bigdelta|.
3209
3210*2.1.40.1. Definition*
3211
3212The 1D scattering intensity for this model is calculated by forming the difference of the amplitudes of two massive
3213parallelepipeds differing in their outermost dimensions in each direction by the same length increment 2 |bigdelta|
3214(Nayuk, 2012).
3215
3216As in the case of the massive parallelepiped, the scattering amplitude is computed for a particular orientation of the
3217parallelepiped with respect to the scattering vector and then averaged over all possible orientations, giving
3218
3219.. math::
3220  P(q) =  \frac{1}{V^2} \frac{2}{\pi} \times \, \int_0^{\frac{\pi}{2}} \, \int_0^{\frac{\pi}{2}} A_{P\Delta}^2(q) \,
3221  \sin\theta \, d\theta \, d\phi
3222
3223where |theta| is the angle between the *z* axis and the longest axis of the parallelepiped, |phi| is the angle between
3224the scattering vector (lying in the *xy* plane) and the *y* axis, and
3225
3226.. math::
3227  A_{P\Delta}\,(q) =  A \, B \, C \, \times
3228                      \frac{\sin \bigl( q \frac{C}{2} \cos\theta \bigr)}{q \frac{C}{2} \cos\theta} \,
3229                      \frac{\sin \bigl( q \frac{A}{2} \sin\theta \sin\phi \bigr)}{q \frac{A}{2} \sin\theta \sin\phi} \,
3230                      \frac{\sin \bigl( q \frac{B}{2} \sin\theta \cos\phi \bigr)}{q \frac{B}{2} \sin\theta \cos\phi} -
3231                      8 \, \bigl( \frac{A}{2} - \Delta \bigr) \, \bigl( \frac{B}{2} - \Delta \bigr) \,
3232                      \bigl( \frac{C}{2} - \Delta \bigr) \, \times
3233                      \frac{\sin \bigl[ q \bigl(\frac{C}{2}-\Delta\bigr) \cos\theta \bigr]}
3234                      {q \bigl(\frac{C}{2}-\Delta\bigr) \cos\theta} \,
3235                      \frac{\sin \bigl[ q \bigl(\frac{A}{2}-\Delta\bigr) \sin\theta \sin\phi \bigr]}
3236                      {q \bigl(\frac{A}{2}-\Delta\bigr) \sin\theta \sin\phi} \,
3237                      \frac{\sin \bigl[ q \bigl(\frac{B}{2}-\Delta\bigr) \sin\theta \cos\phi \bigr]}
3238                      {q \bigl(\frac{B}{2}-\Delta\bigr) \sin\theta \cos\phi} \,
3239
3240where *A*, *B* and *C* are the external sides of the parallelepiped fulfilling :math:`A \le B \le C`, and the volume *V*
3241of the parallelepiped is
3242
3243.. math::
3244  V = A B C \, - \, (A - 2\Delta) (B - 2\Delta) (C - 2\Delta)
3245
3246The 1D scattering intensity is then calculated as
3247
3248.. math::
3249  I(q) = \mbox{scale} \times V \times (\rho_{\mbox{pipe}} - \rho_{\mbox{solvent}})^2 \times P(q)
3250
3251where :math:`\rho_{\mbox{pipe}}` is the scattering length of the parallelepiped, :math:`\rho_{\mbox{solvent}}` is the
3252scattering length of the solvent, and (if the data are in absolute units) *scale* represents the volume fraction (which
3253is unitless).
3254
3255**The 2D scattering intensity is not computed by this model.**
3256
3257The returned value is scaled to units of |cm^-1| and the parameters of the RectangularHollowPrismModel are the
3258following
3259
3260==============  ========  =============
3261Parameter name  Units     Default value
3262==============  ========  =============
3263scale           None      1
3264short_side      |Ang|     35
3265b2a_ratio       None      1
3266c2a_ratio       None      1
3267thickness       |Ang|     1
3268sldPipe         |Ang^-2|  6.3e-6
3269sldSolv         |Ang^-2|  1.0e-6
3270background      |cm^-1|   0
3271==============  ========  =============
3272
3273*2.1.40.2. Validation of the RectangularHollowPrismModel*
3274
3275Validation of the code was conducted by qualitatively comparing the output of the 1D model to the curves shown in
3276(Nayuk, 2012).
3277
3278REFERENCES
3279
3280R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854
3281
3282
3283
3284.. _RectangularHollowPrismInfThinWallsModel:
3285
3286**2.1.41. RectangularHollowPrismInfThinWallsModel**
3287
3288This model provides the form factor, *P(q)*, for a hollow rectangular prism with infinitely thin walls.
3289
3290*2.1.41.1. Definition*
3291
3292The 1D scattering intensity for this model is calculated according to the equations given by Nayuk and Huber
3293(Nayuk, 2012).
3294
3295Assuming a hollow parallelepiped with infinitely thin walls, edge lengths :math:`A \le B \le C` and presenting an
3296orientation with respect to the scattering vector given by |theta| and |phi|, where |theta| is the angle between the
3297*z* axis and the longest axis of the parallelepiped *C*, and |phi| is the angle between the scattering vector
3298(lying in the *xy* plane) and the *y* axis, the form factor is given by
3299
3300.. math::
3301  P(q) =  \frac{1}{V^2} \frac{2}{\pi} \times \, \int_0^{\frac{\pi}{2}} \, \int_0^{\frac{\pi}{2}} [A_L(q)+A_T(q)]^2
3302  \, \sin\theta \, d\theta \, d\phi
3303
3304where
3305
3306.. math::
3307  V = 2AB + 2AC + 2BC
3308
3309.. math::
3310  A_L\,(q) =  8 \times \frac{ \sin \bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr)
3311                              \sin \bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr)
3312                              \cos \bigl( q \frac{C}{2} \cos\theta \bigr) }
3313                            {q^2 \, \sin^2\theta \, \sin\phi \cos\phi}
3314
3315.. math::
3316  A_T\,(q) =  A_F\,(q) \times \frac{2 \, \sin \bigl( q \frac{C}{2} \cos\theta \bigr)}{q \, \cos\theta}
3317
3318and
3319
3320.. math::
3321  A_F\,(q) =  4 \frac{ \cos \bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr)
3322                       \sin \bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr) }
3323                     {q \, \cos\phi \, \sin\theta} +
3324              4 \frac{ \sin \bigl( q \frac{A}{2} \sin\phi \sin\theta \bigr)
3325                       \cos \bigl( q \frac{B}{2} \cos\phi \sin\theta \bigr) }
3326                     {q \, \sin\phi \, \sin\theta}
3327
3328The 1D scattering intensity is then calculated as
3329
3330.. math::
3331  I(q) = \mbox{scale} \times V \times (\rho_{\mbox{pipe}} - \rho_{\mbox{solvent}})^2 \times P(q)
3332
3333where *V* is the volume of the rectangular prism, :math:`\rho_{\mbox{pipe}}` is the scattering length of the
3334parallelepiped, :math:`\rho_{\mbox{solvent}}` is the scattering length of the solvent, and (if the data are in absolute
3335units) *scale* represents the volume fraction (which is unitless).
3336
3337**The 2D scattering intensity is not computed by this model.**
3338
3339The returned value is scaled to units of |cm^-1| and the parameters of the RectangularHollowPrismInfThinWallModel
3340are the following
3341
3342==============  ========  =============
3343Parameter name  Units     Default value
3344==============  ========  =============
3345scale           None      1
3346short_side      |Ang|     35
3347b2a_ratio       None      1
3348c2a_ratio       None      1
3349sldPipe         |Ang^-2|  6.3e-6
3350sldSolv         |Ang^-2|  1.0e-6
3351background      |cm^-1|   0
3352==============  ========  =============
3353
3354*2.1.41.2. Validation of the RectangularHollowPrismInfThinWallsModel*
3355
3356Validation of the code was conducted  by qualitatively comparing the output of the 1D model to the curves shown in
3357(Nayuk, 2012).
3358
3359REFERENCES
3360
3361R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854
3362
3363
3364
3365.. _MicelleSphCoreModel:
3366
3367**2.1.42. MicelleSphCoreModel**
3368
3369This model provides the form factor, *P(q)*, for a micelle with a spherical core
3370and Gaussian polymer chains attached to the surface.
3371
3372*2.1.42.1. Definition*
3373
3374The 1D scattering intensity for this model is calculated according to the equations given by Pedersen
3375(Pedersen, 2000).
3376
3377*2.1.42.2. Validation of the MicelleSphCoreModel*
3378
3379This model has not yet been validated. Feb2015
3380
3381REFERENCES
3382
3383J Pedersen, *J. Appl. Cryst.*, 33 (2000) 637-640
3384
3385
3386
33872.2 Shape-independent Functions
3388-------------------------------
3389
3390The following are models used for shape-independent SAS analysis.
3391
3392.. _Debye:
3393
3394**2.2.1. Debye (Gaussian Coil Model)**
3395
3396The Debye model is a form factor for a linear polymer chain obeying Gaussian statistics (ie, it is in the theta state).
3397In addition to the radius-of-gyration, *Rg*, a scale factor *scale*, and a constant background term are included in the
3398calculation. **NB: No size polydispersity is included in this model, use the** Poly_GaussCoil_ **Model instead**
3399
3400.. image:: ..\img\olddocs\image172.PNG
3401
3402For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3403
3404.. image:: ..\img\olddocs\image040.gif
3405
3406==============  ========  =============
3407Parameter name  Units     Default value
3408==============  ========  =============
3409scale           None      1.0
3410rg              |Ang|     50.0
3411background      |cm^-1|   0.0
3412==============  ========  =============
3413
3414.. image:: ..\img\olddocs\image173.jpg
3415
3416*Figure. 1D plot using the default values (w/200 data point).*
3417
3418REFERENCE
3419
3420R J Roe, *Methods of X-Ray and Neutron Scattering in Polymer Science*, Oxford University Press, New York (2000)
3421
3422
3423
3424.. _BroadPeakModel:
3425
3426**2.2.2. BroadPeakModel**
3427
3428This model calculates an empirical functional form for SAS data characterized by a broad scattering peak. Many SAS
3429spectra are characterized by a broad peak even though they are from amorphous soft materials. For example, soft systems
3430that show a SAS peak include copolymers, polyelectrolytes, multiphase systems, layered structures, etc.
3431
3432The d-spacing corresponding to the broad peak is a characteristic distance between the scattering inhomogeneities (such
3433as in lamellar, cylindrical, or spherical morphologies, or for bicontinuous structures).
3434
3435The returned value is scaled to units of |cm^-1|, absolute scale.
3436
3437*2.2.2.1. Definition*
3438
3439The scattering intensity *I(q)* is calculated as
3440
3441.. image:: ..\img\olddocs\image174.jpg
3442
3443Here the peak position is related to the d-spacing as *Q0* = 2|pi| / *d0*.
3444
3445For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3446
3447.. image:: ..\img\olddocs\image040.gif
3448
3449==================  ========  =============
3450Parameter name      Units     Default value
3451==================  ========  =============
3452scale_l    (=C)     None      10
3453scale_p    (=A)     None      1e-05
3454length_l (= |xi| )  |Ang|     50
3455q_peak    (=Q0)     |Ang^-1|  0.1
3456exponent_p (=n)     None      2
3457exponent_l (=m)     None      3
3458Background (=B)     |cm^-1|   0.1
3459==================  ========  =============
3460
3461.. image:: ..\img\olddocs\image175.jpg
3462
3463*Figure. 1D plot using the default values (w/200 data point).*
3464
3465REFERENCE
3466
3467None.
3468
3469*2013/09/09 - Description reviewed by King, S and Parker, P.*
3470
3471
3472
3473.. _CorrLength:
3474
3475**2.2.3. CorrLength (Correlation Length Model)**
3476
3477Calculates an empirical functional form for SAS data characterized by a low-Q signal and a high-Q signal.
3478
3479The returned value is scaled to units of |cm^-1|, absolute scale.
3480
3481*2.2.3. Definition*
3482
3483The scattering intensity *I(q)* is calculated as
3484
3485.. image:: ..\img\olddocs\image176.jpg
3486
3487The first term describes Porod scattering from clusters (exponent = n) and the second term is a Lorentzian function
3488describing scattering from polymer chains (exponent = *m*). This second term characterizes the polymer/solvent
3489interactions and therefore the thermodynamics. The two multiplicative factors *A* and *C*, the incoherent
3490background *B* and the two exponents *n* and *m* are used as fitting parameters. The final parameter |xi| is a
3491correlation length for the polymer chains. Note that when *m*\ =2 this functional form becomes the familiar Lorentzian
3492function. 
3493
3494For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3495
3496.. image:: ..\img\olddocs\image040.gif
3497
3498====================  ========  =============
3499Parameter name        Units     Default value
3500====================  ========  =============
3501scale_l    (=C)       None      10
3502scale_p    (=A)       None      1e-06
3503length_l   (= |xi| )  |Ang|     50
3504exponent_p (=n)       None      2
3505exponent_l (=m)       None      3
3506Background (=B)       |cm^-1|   0.1
3507====================  ========  =============
3508
3509.. image:: ..\img\olddocs\image177.jpg
3510
3511*Figure. 1D plot using the default values (w/500 data points).*
3512
3513REFERENCE
3514
3515B Hammouda, D L Ho and S R Kline, *Insight into Clustering in Poly(ethylene oxide) Solutions*, *Macromolecules*, 37
3516(2004) 6932-6937
3517
3518*2013/09/09 - Description reviewed by King, S and Parker, P.*
3519
3520
3521
3522.. _Lorentz:
3523
3524**2.2.4. Lorentz (Ornstein-Zernicke Model)**
3525
3526*2.2.4.1. Definition*
3527
3528The Ornstein-Zernicke model is defined by
3529
3530.. image:: ..\img\olddocs\image178.PNG
3531
3532The parameter *L* is the screening length.
3533
3534For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3535
3536.. image:: ..\img\olddocs\image040.gif
3537
3538==============  ========  =============
3539Parameter name  Units     Default value
3540==============  ========  =============
3541scale           None      1.0
3542length          |Ang|     50.0
3543background      |cm^-1|   0.0
3544==============  ========  =============
3545
3546.. image:: ..\img\olddocs\image179.jpg
3547
3548* Figure. 1D plot using the default values (w/200 data point).*
3549
3550REFERENCE
3551
3552None.
3553
3554
3555
3556.. _DABModel:
3557
3558**2.2.5. DABModel (Debye-Anderson-Brumberger Model)**
3559
3560Calculates the scattering from a randomly distributed, two-phase system based on the Debye-Anderson-Brumberger (DAB)
3561model for such systems. The two-phase system is characterized by a single length scale, the correlation length, which
3562is a measure of the average spacing between regions of phase 1 and phase 2. **The model also assumes smooth interfaces**
3563**between the phases** and hence exhibits Porod behavior (I ~ *q*\ :sup:`-4`) at large *q* (*QL* >> 1).
3564
3565The DAB model is ostensibly a development of the earlier Debye-Bueche model.
3566
3567*2.2.5.1. Definition*
3568
3569.. image:: ..\img\olddocs\image180_corrected.PNG
3570
3571The parameter *L* is the correlation length.
3572
3573For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3574
3575.. image:: ..\img\olddocs\image040.gif
3576
3577==============  ========  =============
3578Parameter name  Units     Default value
3579==============  ========  =============
3580scale           None      1.0
3581length          |Ang|     50.0
3582background      |cm^-1|   0.0
3583==============  ========  =============
3584
3585.. image:: ..\img\olddocs\image181.jpg
3586
3587* Figure. 1D plot using the default values (w/200 data point).*
3588
3589REFERENCE
3590
3591P Debye, H R Anderson, H Brumberger, *Scattering by an Inhomogeneous Solid. II. The Correlation Function*
3592*and its Application*, *J. Appl. Phys.*, 28(6) (1957) 679
3593
3594P Debye, A M Bueche, *Scattering by an Inhomogeneous Solid*, *J. Appl. Phys.*, 20 (1949) 518
3595
3596*2013/09/09 - Description reviewed by King, S and Parker, P.*
3597
3598
3599
3600.. _AbsolutePower_Law:
3601
3602**2.2.6. AbsolutePower_Law**
3603
3604This model describes a simple power law with background.
3605
3606.. image:: ..\img\olddocs\image182.PNG
3607
3608Note the minus sign in front of the exponent. The parameter *m* should therefore be entered as a **positive** number.
3609
3610==============  ========  =============
3611Parameter name  Units     Default value
3612==============  ========  =============
3613Scale           None      1.0
3614m               None      4
3615Background      |cm^-1|   0.0
3616==============  ========  =============
3617
3618.. image:: ..\img\olddocs\image183.jpg
3619
3620*Figure. 1D plot using the default values (w/200 data point).*
3621
3622REFERENCE
3623
3624None.
3625
3626
3627
3628.. _TeubnerStrey:
3629
3630**2.2.7. TeubnerStrey (Model)**
3631
3632This function calculates the scattered intensity of a two-component system using the Teubner-Strey model. Unlike the
3633DABModel_ this function generates a peak.
3634
3635*2.2.7.1. Definition*
3636
3637.. image:: ..\img\olddocs\image184.PNG
3638
3639For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3640
3641.. image:: ..\img\olddocs\image040.gif
3642
3643==============  ========  =============
3644Parameter name  Units     Default value
3645==============  ========  =============
3646scale           None      0.1
3647c1              None      -30.0
3648c2              None      5000.0
3649background      |cm^-1|   0.0
3650==============  ========  =============
3651
3652.. image:: ..\img\olddocs\image185.jpg
3653
3654*Figure. 1D plot using the default values (w/200 data point).*
3655
3656REFERENCE
3657
3658M Teubner, R Strey, *J. Chem. Phys.*, 87 (1987) 3195
3659
3660K V Schubert, R Strey, S R Kline and E W Kaler, *J. Chem. Phys.*, 101 (1994) 5343
3661
3662
3663
3664.. _FractalModel:
3665
3666**2.2.8. FractalModel**
3667
3668Calculates the scattering from fractal-like aggregates built from spherical building blocks following the Texiera
3669reference.
3670
3671The value returned is in |cm^-1|\ .
3672
3673*2.2.8.1. Definition*
3674
3675.. image:: ..\img\olddocs\image186.PNG
3676
3677The *scale* parameter is the volume fraction of the building blocks, *R0* is the radius of the building block, *Df* is
3678the fractal dimension, |xi| is the correlation length, |rho|\ *solvent* is the scattering length density of the
3679solvent, and |rho|\ *block* is the scattering length density of the building blocks.
3680
3681**Polydispersity on the radius is provided for.**
3682
3683For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3684
3685.. image:: ..\img\olddocs\image040.gif
3686
3687==============  ========  =============
3688Parameter name  Units     Default value
3689==============  ========  =============
3690scale           None      0.05
3691radius          |Ang|     5.0
3692fractal_dim     None      2
3693corr_length     |Ang|     100.0
3694block_sld       |Ang^-2|  2e-6
3695solvent_sld     |Ang^-2|  6e-6
3696background      |cm^-1|   0.0
3697==============  ========  =============
3698
3699.. image:: ..\img\olddocs\image187.jpg
3700
3701*Figure. 1D plot using the default values (w/200 data point).*
3702
3703REFERENCE
3704
3705J Teixeira, *J. Appl. Cryst.*, 21 (1988) 781-785
3706
3707
3708
3709.. _MassFractalModel:
3710
3711**2.2.9. MassFractalModel**
3712
3713Calculates the scattering from fractal-like aggregates based on the Mildner reference.
3714
3715*2.2.9.1. Definition*
3716
3717.. image:: ..\img\olddocs\mass_fractal_eq1.jpg
3718
3719where *R* is the radius of the building block, *Dm* is the **mass** fractal dimension, |zeta| is the cut-off length,
3720|rho|\ *solvent* is the scattering length density of the solvent, and |rho|\ *particle* is the scattering length
3721density of particles.
3722
3723Note:  The mass fractal dimension *Dm* is only valid if 1 < mass_dim < 6. It is also only valid over a limited
3724*q* range (see the reference for details).
3725
3726==============  ========  =============
3727Parameter name  Units     Default value
3728==============  ========  =============
3729scale           None      1
3730radius          |Ang|     10.0
3731mass_dim        None      1.9
3732co_length       |Ang|     100.0
3733background      |cm^-1|   0.0
3734==============  ========  =============
3735
3736.. image:: ..\img\olddocs\mass_fractal_fig1.jpg
3737
3738*Figure. 1D plot using default values.*
3739
3740REFERENCE
3741
3742D Mildner and P Hall, *J. Phys. D: Appl. Phys.*,  19 (1986) 1535-1545
3743Equation(9)
3744
3745*2013/09/09 - Description reviewed by King, S and Parker, P.*
3746
3747
3748
3749.. _SurfaceFractalModel:
3750
3751**2.2.10. SurfaceFractalModel**
3752
3753Calculates the scattering from fractal-like aggregates based on the Mildner reference.
3754
3755*2.2.10.1. Definition*
3756
3757.. image:: ..\img\olddocs\surface_fractal_eq1.gif
3758
3759where *R* is the radius of the building block, *Ds* is the **surface** fractal dimension, |zeta| is the cut-off length,
3760|rho|\ *solvent* is the scattering length density of the solvent, and |rho|\ *particle* is the scattering length
3761density of particles.
3762
3763Note:  The surface fractal dimension *Ds* is only valid if 1 < surface_dim < 3. It is also only valid over a limited
3764*q* range (see the reference for details).
3765
3766==============  ========  =============
3767Parameter name  Units     Default value
3768==============  ========  =============
3769scale           None      1
3770radius          |Ang|     10.0
3771surface_dim     None      2.0
3772co_length       |Ang|     500.0
3773background      |cm^-1|   0.0
3774==============  ========  =============
3775
3776.. image:: ..\img\olddocs\surface_fractal_fig1.jpg
3777
3778*Figure. 1D plot using default values.*
3779
3780REFERENCE
3781
3782D Mildner and P Hall, *J. Phys. D: Appl. Phys.*,  19 (1986) 1535-1545
3783Equation(13)
3784
3785
3786
3787.. _MassSurfaceFractal:
3788
3789**2.2.11. MassSurfaceFractal (Model)**
3790
3791A number of natural and commercial processes form high-surface area materials as a result of the vapour-phase
3792aggregation of primary particles. Examples of such materials include soots, aerosols, and fume or pyrogenic silicas.
3793These are all characterised by cluster mass distributions (sometimes also cluster size distributions) and internal
3794surfaces that are fractal in nature. The scattering from such materials displays two distinct breaks in log-log
3795representation, corresponding to the radius-of-gyration of the primary particles, *rg*, and the radius-of-gyration of
3796the clusters (aggregates), *Rg*. Between these boundaries the scattering follows a power law related to the mass
3797fractal dimension, *Dm*, whilst above the high-Q boundary the scattering follows a power law related to the surface
3798fractal dimension of the primary particles, *Ds*.
3799
3800*2.2.11.1. Definition*
3801
3802The scattered intensity *I(q)* is  calculated using a modified Ornstein-Zernicke equation
3803
3804.. image:: ..\img\olddocs\masssurface_fractal_eq1.jpg
3805
3806where *Rg* is the size of the cluster, *rg* is the size of the primary particle, *Ds* is the surface fractal dimension,
3807*Dm* is the mass fractal dimension, |rho|\ *solvent* is the scattering length density of the solvent, and |rho|\ *p* is
3808the scattering length density of particles.
3809
3810Note:  The surface (*Ds*) and mass (*Dm*) fractal dimensions are only valid if 0 < *surface_dim* < 6,
38110 < *mass_dim* < 6, and (*surface_dim*+*mass_dim*) < 6. 
3812
3813==============  ========  =============
3814Parameter name  Units     Default value
3815==============  ========  =============
3816scale           None      1
3817primary_rg      |Ang|     4000.0
3818cluster_rg      |Ang|     86.7
3819surface_dim     None      2.3
3820mass_dim        None      1.8
3821background      |cm^-1|   0.0
3822==============  ========  =============
3823
3824.. image:: ..\img\olddocs\masssurface_fractal_fig1.jpg
3825
3826*Figure. 1D plot using default values.*
3827
3828REFERENCE
3829
3830P Schmidt, *J Appl. Cryst.*, 24 (1991) 414-435
3831Equation(19)
3832
3833A J Hurd, D W Schaefer, J E Martin, *Phys. Rev. A*, 35 (1987) 2361-2364
3834Equation(2)
3835
3836
3837
3838.. _FractalCoreShell:
3839
3840**2.2.12. FractalCoreShell (Model)**
3841
3842Calculates the scattering from a fractal structure with a primary building block of core-shell spheres, as opposed to
3843just homogeneous spheres in the FractalModel_. This model could find use for aggregates of coated particles, or
3844aggregates of vesicles.
3845
3846The returned value is scaled to units of |cm^-1|, absolute scale.
3847
3848*2.2.12.1. Definition*
3849
3850.. image:: ..\img\olddocs\fractcore_eq1.gif
3851
3852The form factor *P(q)* is that from CoreShellModel_ with *bkg* = 0
3853
3854.. image:: ..\img\olddocs\image013.PNG
3855
3856while the fractal structure factor S(q) is
3857
3858.. image:: ..\img\olddocs\fractcore_eq3.gif
3859
3860where *Df* = frac_dim, |xi| = cor_length, *rc* = (core) radius, and *scale* = volume fraction.
3861
3862The fractal structure is as documented in the FractalModel_. Polydispersity of radius and thickness is provided for.
3863
3864For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3865
3866.. image:: ..\img\olddocs\image040.gif
3867
3868==============  ========  =============
3869Parameter name  Units     Default value
3870==============  ========  =============
3871volfraction     None      0.05
3872frac_dim        None      2
3873thickness       |Ang|     5.0
3874radius          |Ang|     20.0
3875cor_length      |Ang|     100.0
3876core_sld        |Ang^-2|  3.5e-6
3877shell_sld       |Ang^-2|  1e-6
3878solvent_sld     |Ang^-2|  6.35e-6
3879background      |cm^-1|   0.0
3880==============  ========  =============
3881
3882.. image:: ..\img\olddocs\image188.jpg
3883
3884*Figure. 1D plot using the default values (w/500 data points).*
3885
3886REFERENCE
3887
3888See the CoreShellModel_ and FractalModel_ descriptions.
3889
3890
3891
3892.. _GaussLorentzGel:
3893
3894**2.2.13. GaussLorentzGel(Model)**
3895
3896Calculates the scattering from a gel structure, but typically a physical rather than chemical network. It is modeled as
3897a sum of a low-*q* exponential decay plus a lorentzian at higher *q*-values.
3898
3899Also see the GelFitModel_.
3900
3901The returned value is scaled to units of |cm^-1|, absolute scale.
3902
3903*2.2.13.1. Definition*
3904
3905The scattering intensity *I(q)* is calculated as (eqn 5 from the reference)
3906
3907.. image:: ..\img\olddocs\image189.jpg
3908
3909|bigzeta| is the length scale of the static correlations in the gel, which can be attributed to the "frozen-in"
3910crosslinks. |xi| is the dynamic correlation length, which can be attributed to the fluctuating polymer chains between
3911crosslinks. *I*\ :sub:`G`\ *(0)* and *I*\ :sub:`L`\ *(0)* are the scaling factors for each of these structures. **Think carefully about how**
3912**these map to your particular system!**
3913
3914NB: The peaked structure at higher *q* values (Figure 2 from the reference) is not reproduced by the model. Peaks can
3915be introduced into the model by summing this model with the PeakGaussModel_ function.
3916
3917For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3918
3919.. image:: ..\img\olddocs\image040.gif
3920
3921===================================  ========  =============
3922Parameter name                       Units     Default value
3923===================================  ========  =============
3924dyn_colength (=dynamic corr length)  |Ang|     20.0
3925scale_g       (=Gauss scale factor)  None      100
3926scale_l  (=Lorentzian scale factor)  None      50
3927stat_colength (=static corr length)  |Ang|     100.0
3928background                           |cm^-1|   0.0
3929===================================  ========  =============
3930
3931.. image:: ..\img\olddocs\image190.jpg
3932
3933*Figure. 1D plot using the default values (w/500 data points).*
3934
3935REFERENCE
3936
3937G Evmenenko, E Theunissen, K Mortensen, H Reynaers, *Polymer*, 42 (2001) 2907-2913
3938
3939
3940
3941.. _BEPolyelectrolyte:
3942
3943**2.2.14. BEPolyelectrolyte (Model)**
3944
3945Calculates the structure factor of a polyelectrolyte solution with the RPA expression derived by Borue and Erukhimovich.
3946
3947The value returned is in |cm^-1|.
3948
3949*2.2.14.1. Definition*
3950
3951.. image:: ..\img\olddocs\image191.PNG
3952
3953where *K* is the contrast factor for the polymer, *Lb* is the Bjerrum length, *h* is the virial parameter, *b* is the
3954monomer length, *Cs* is the concentration of monovalent salt, |alpha| is the ionization degree, *Ca* is the polymer
3955molar concentration, and *background* is the incoherent background.
3956
3957For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3958
3959.. image:: ..\img\olddocs\image040.gif
3960
3961==============  ========  =============
3962Parameter name  Units     Default value
3963==============  ========  =============
3964K               barns     10
3965Lb              |Ang|     7.1
3966h               |Ang^-3|  12
3967b               |Ang|     10
3968Cs              mol/L     0
3969alpha           None      0.05
3970Ca              mol/L     0.7
3971background      |cm^-1|   0.0
3972==============  ========  =============
3973
3974NB: 1 barn = 10\ :sup:`-24` |cm^2|
3975
3976REFERENCE
3977
3978V Y Borue, I Y Erukhimovich, *Macromolecules*, 21 (1988) 3240
3979
3980J F Joanny, L Leibler, *Journal de Physique*, 51 (1990) 545
3981
3982A Moussaid, F Schosseler, J P Munch, S Candau, *J. Journal de Physique II France*, 3 (1993) 573
3983
3984E Raphael, J F Joanny, *Europhysics Letters*, 11 (1990) 179
3985
3986
3987
3988.. _Guinier:
3989
3990**2.2.15. Guinier (Model)**
3991
3992This model fits the Guinier function
3993
3994.. image:: ..\img\olddocs\image192.PNG
3995
3996to the data directly without any need for linearisation (*cf*. Ln *I(q)* vs *q*\ :sup:`2`).
3997
3998For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
3999
4000.. image:: ..\img\olddocs\image040.gif
4001
4002==============  ========  =============
4003Parameter name  Units     Default value
4004==============  ========  =============
4005scale           |cm^-1|   1.0
4006Rg              |Ang|     0.1
4007==============  ========  =============
4008
4009REFERENCE
4010
4011A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley & Sons, New York (1955)
4012
4013
4014
4015.. _GuinierPorod:
4016
4017**2.2.16. GuinierPorod (Model)**
4018
4019Calculates the scattering for a generalized Guinier/power law object. This is an empirical model that can be used to
4020determine the size and dimensionality of scattering objects, including asymmetric objects such as rods or platelets, and
4021shapes intermediate between spheres and rods or between rods and platelets.
4022
4023The result is in the units of |cm^-1|, absolute scale.
4024
4025*2.2.16.1 Definition*
4026
4027The following functional form is used
4028
4029.. image:: ..\img\olddocs\image193.jpg
4030
4031This is based on the generalized Guinier law for such elongated objects (see the Glatter reference below). For 3D
4032globular objects (such as spheres), *s* = 0 and one recovers the standard Guinier_ formula. For 2D symmetry (such as
4033for rods) *s* = 1, and for 1D symmetry (such as for lamellae or platelets) *s* = 2. A dimensionality parameter (3-*s*)
4034is thus defined, and is 3 for spherical objects, 2 for rods, and 1 for plates.
4035
4036Enforcing the continuity of the Guinier and Porod functions and their derivatives yields
4037
4038.. image:: ..\img\olddocs\image194.jpg
4039
4040and
4041
4042.. image:: ..\img\olddocs\image195.jpg
4043
4044Note that
4045
4046 the radius-of-gyration for a sphere of radius *R* is given by *Rg* = *R* sqrt(3/5)
4047
4048 the cross-sectional radius-of-gyration for a randomly oriented cylinder of radius *R* is given by *Rg* = *R* / sqrt(2)
4049
4050 the cross-sectional radius-of-gyration of a randomly oriented lamella of thickness *T* is given by *Rg* = *T* / sqrt(12)
4051
4052For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4053
4054.. image:: ..\img\olddocs\image008.PNG
4055
4056==============================  ========  =============
4057Parameter name                  Units     Default value
4058==============================  ========  =============
4059scale      (=Guinier scale, G)  |cm^-1|   1.0
4060rg                              |Ang|     100
4061dim (=dimensional variable, s)  None      1
4062m            (=Porod exponent)  None      3
4063background                      |cm^-1|   0.1
4064==============================  ========  =============
4065
4066.. image:: ..\img\olddocs\image196.jpg
4067
4068*Figure. 1D plot using the default values (w/500 data points).*
4069
4070REFERENCE
4071
4072A Guinier, G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955)
4073
4074O Glatter, O Kratky, *Small-Angle X-Ray Scattering*, Academic Press (1982)
4075Check out Chapter 4 on Data Treatment, pages 155-156.
4076
4077
4078
4079.. _PorodModel:
4080
4081**2.2.17. PorodModel**
4082
4083This model fits the Porod function
4084
4085.. image:: ..\img\olddocs\image197_corrected.PNG
4086
4087to the data directly without any need for linearisation (*cf*. Log *I(q)* vs Log *q*).
4088
4089Here *C* is the scale factor and *Sv* is the specific surface area (ie, surface area / volume) of the sample, and
4090|drho| is the contrast factor.
4091
4092For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4093
4094.. image:: ..\img\olddocs\image040.gif
4095
4096==============  ========  =============
4097Parameter name  Units     Default value
4098==============  ========  =============
4099scale           |Ang^-4|  0.1
4100background      |cm^-1|   0
4101==============  ========  =============
4102
4103REFERENCE
4104
4105None.
4106
4107
4108
4109.. _PeakGaussModel:
4110
4111**2.2.18. PeakGaussModel**
4112
4113This model describes a Gaussian shaped peak on a flat background
4114
4115.. image:: ..\img\olddocs\image198.PNG
4116
4117with the peak having height of *I0* centered at *q0* and having a standard deviation of *B*.  The FWHM (full-width
4118half-maximum) is 2.354 B.  
4119
4120For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4121
4122.. image:: ..\img\olddocs\image040.gif
4123
4124==============  ========  =============
4125Parameter name  Units     Default value
4126==============  ========  =============
4127scale           |cm^-1|   100
4128q0              |Ang^-1|  0.05
4129B               |Ang^-1|  0.005
4130background      |cm^-1|   1
4131==============  ========  =============
4132
4133.. image:: ..\img\olddocs\image199.jpg
4134
4135*Figure. 1D plot using the default values (w/500 data points).*
4136
4137REFERENCE
4138
4139None.
4140
4141
4142
4143.. _PeakLorentzModel:
4144
4145**2.2.19. PeakLorentzModel**
4146
4147This model describes a Lorentzian shaped peak on a flat background
4148
4149.. image:: ..\img\olddocs\image200.PNG
4150
4151with the peak having height of *I0* centered at *q0* and having a HWHM (half-width half-maximum) of B. 
4152
4153For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4154
4155.. image:: ..\img\olddocs\image040.gif
4156
4157==============  ========  =============
4158Parameter name  Units     Default value
4159==============  ========  =============
4160scale           |cm^-1|   100
4161q0              |Ang^-1|  0.05
4162B               |Ang^-1|  0.005
4163background      |cm^-1|     1
4164==============  ========  =============
4165
4166.. image:: ..\img\olddocs\image201.jpg
4167
4168*Figure. 1D plot using the default values (w/500 data points).*
4169
4170REFERENCE
4171
4172None.
4173
4174
4175
4176.. _Poly_GaussCoil:
4177
4178**2.2.20. Poly_GaussCoil (Model)**
4179
4180This model calculates an empirical functional form for the scattering from a **polydisperse** polymer chain in the
4181theta state assuming a Schulz-Zimm type molecular weight distribution. Polydispersity on the radius-of-gyration is also
4182provided for.
4183
4184The returned value is scaled to units of |cm^-1|, absolute scale.
4185
4186*2.2.20.1. Definition*
4187
4188The scattering intensity *I(q)* is calculated as
4189
4190.. image:: ..\img\olddocs\image202.PNG
4191
4192where the dimensionless chain dimension is
4193
4194.. image:: ..\img\olddocs\image203.PNG
4195
4196and the polydispersity is
4197
4198.. image:: ..\img\olddocs\image204.PNG
4199
4200For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4201
4202.. image:: ..\img\olddocs\image040.gif
4203
4204This example dataset is produced using 200 data points, using 200 data points,
4205*qmin* = 0.001 |Ang^-1|, *qmax* = 0.7 |Ang^-1| and the default values
4206
4207==============  ========  =============
4208Parameter name  Units     Default value
4209==============  ========  =============
4210scale           None      1.0
4211rg              |Ang|     60.0
4212poly_m (Mw/Mn)  None      2
4213background      |cm^-1|   0.001
4214==============  ========  =============
4215
4216.. image:: ..\img\olddocs\image205.jpg
4217
4218*Figure. 1D plot using the default values (w/200 data point).*
4219
4220REFERENCE
4221
4222O Glatter and O Kratky (editors), *Small Angle X-ray Scattering*, Academic Press, (1982)
4223Page 404
4224
4225J S Higgins, and H C Benoit, Polymers and Neutron Scattering, Oxford Science Publications (1996)
4226
4227
4228
4229.. _PolyExclVolume:
4230
4231**2.2.21. PolymerExclVolume (Model)**
4232
4233This model describes the scattering from polymer chains subject to excluded volume effects, and has been used as a
4234template for describing mass fractals.
4235
4236The returned value is scaled to units of |cm^-1|, absolute scale.
4237
4238*2.2.21.1 Definition*
4239
4240The form factor  was originally presented in the following integral form (Benoit, 1957)
4241
4242.. image:: ..\img\olddocs\image206.jpg
4243
4244where |nu| is the excluded volume parameter (which is related to the Porod exponent *m* as |nu| = 1 / *m*), *a* is the
4245statistical segment length of the polymer chain, and *n* is the degree of polymerization. This integral was later put
4246into an almost analytical form as follows (Hammouda, 1993)
4247
4248.. image:: ..\img\olddocs\image207.jpg
4249
4250where |gamma|\ *(x,U)* is the incomplete gamma function
4251
4252.. image:: ..\img\olddocs\image208.jpg
4253
4254and the variable *U* is given in terms of the scattering vector *Q* as
4255
4256.. image:: ..\img\olddocs\image209.jpg
4257
4258The square of the radius-of-gyration is defined as
4259
4260.. image:: ..\img\olddocs\image210.jpg
4261
4262Note that this model applies only in the mass fractal range (ie, 5/3 <= *m* <= 3) and **does not** apply to surface
4263fractals (3 < *m* <= 4). It also does not reproduce the rigid rod limit (*m* = 1) because it assumes chain flexibility
4264from the outset. It may cover a portion of the semi-flexible chain range (1 < *m* < 5/3).
4265
4266A low-*Q* expansion yields the Guinier form and a high-*Q* expansion yields the Porod form which is given by
4267
4268.. image:: ..\img\olddocs\image211.jpg
4269
4270Here |biggamma|\ *(x)* = |gamma|\ *(x,inf)* is the gamma function.
4271
4272The asymptotic limit is dominated by the first term
4273
4274.. image:: ..\img\olddocs\image212.jpg
4275
4276The special case when |nu| = 0.5 (or *m* = 1/|nu| = 2) corresponds to Gaussian chains for which the form factor is given
4277by the familiar Debye_ function.
4278
4279.. image:: ..\img\olddocs\image213.jpg
4280
4281For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4282
4283.. image:: ..\img\olddocs\image040.gif
4284
4285This example dataset is produced using 200 data points, *qmin* = 0.001 |Ang^-1|, *qmax* = 0.2 |Ang^-1| and the default
4286values
4287
4288===================  ========  =============
4289Parameter name       Units     Default value
4290===================  ========  =============
4291scale                None      1.0
4292rg                   |Ang|     60.0
4293m (=Porod exponent)  None      3
4294background           |cm^-1|   0.0
4295===================  ========  =============
4296
4297.. image:: ..\img\olddocs\image214.jpg
4298
4299*Figure. 1D plot using the default values (w/500 data points).*
4300
4301REFERENCE
4302
4303H Benoit, *Comptes Rendus*, 245 (1957) 2244-2247
4304
4305B Hammouda, *SANS from Homogeneous Polymer Mixtures ­ A Unified Overview*, *Advances in Polym. Sci.*, 106 (1993) 87-133
4306
4307
4308
4309.. _RPA10Model:
4310
4311**2.2.22. RPA10Model**
4312
4313Calculates the macroscopic scattering intensity (units of |cm^-1|) for a multicomponent homogeneous mixture of polymers
4314using the Random Phase Approximation. This general formalism contains 10 specific cases
4315
4316Case 0: C/D binary mixture of homopolymers
4317
4318Case 1: C-D diblock copolymer
4319
4320Case 2: B/C/D ternary mixture of homopolymers
4321
4322Case 3: C/C-D mixture of a homopolymer B and a diblock copolymer C-D
4323
4324Case 4: B-C-D triblock copolymer
4325
4326Case 5: A/B/C/D quaternary mixture of homopolymers
4327
4328Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D
4329
4330Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D
4331
4332Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D
4333
4334Case 9: A-B-C-D tetra-block copolymer
4335
4336**NB: these case numbers are different from those in the NIST SANS package!**
4337
4338Only one case can be used at any one time.
4339
4340The returned value is scaled to units of |cm^-1|, absolute scale.
4341
4342The RPA (mean field) formalism only applies only when the multicomponent polymer mixture is in the homogeneous
4343mixed-phase region.
4344
4345**Component D is assumed to be the "background" component (ie, all contrasts are calculated with respect to**
4346**component D).** So the scattering contrast for a C/D blend = [SLD(component C) - SLD(component D)]\ :sup:`2`.
4347
4348Depending on which case is being used, the number of fitting parameters - the segment lengths (ba, bb, etc) and |chi|
4349parameters (Kab, Kac, etc) - vary. The *scale* parameter should be held equal to unity.
4350
4351The input parameters are the degrees of polymerization, the volume fractions, the specific volumes, and the neutron
4352scattering length densities for each component.
4353
4354Fitting parameters for a Case 0 Model
4355
4356=======================  ========  =============
4357Parameter name           Units     Default value
4358=======================  ========  =============
4359background               |cm^-1|   0.0
4360scale                    None      1
4361bc (=segment Length_bc)  **unit**  5
4362bd (=segment length_bd)  **unit**  5
4363Kcd (=chi_cd)            **unit**  -0.0004
4364=======================  ========  =============
4365
4366Fixed parameters for a Case 0 Model
4367
4368=======================  ========  =============
4369Parameter name           Units     Default value
4370=======================  ========  =============
4371Lc (=scatter. length_c)  **unit**  1e-12
4372Ld (=scatter. length_d)  **unit**  0
4373Nc    (=degree polym_c)  None      1000
4374Nd    (=degree polym_d)  None      1000
4375Phic (=vol. fraction_c)  None      0.25
4376Phid (=vol. fraction_d)  None      0.25
4377vc (=specific volume_c)  **unit**  100
4378vd (=specific volume_d)  **unit**  100
4379=======================  ========  =============
4380
4381.. image:: ..\img\olddocs\image215.jpg
4382
4383*Figure. 1D plot using the default values (w/500 data points).*
4384
4385REFERENCE
4386
4387A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136
4388
4389
4390
4391.. _TwoLorentzian:
4392
4393**2.2.23. TwoLorentzian (Model)**
4394
4395This model calculates an empirical functional form for SAS data characterized by two Lorentzian-type functions.
4396
4397The returned value is scaled to units of |cm^-1|, absolute scale.
4398
4399*2.2.23.1. Definition*
4400
4401The scattering intensity *I(q)* is calculated as
4402
4403.. image:: ..\img\olddocs\image216.jpg 
4404
4405where *A* = Lorentzian scale factor #1, *C* = Lorentzian scale #2, |xi|\ :sub:`1` and |xi|\ :sub:`2` are the
4406corresponding correlation lengths, and *n* and *m* are the respective power law exponents (set *n* = *m* = 2 for
4407Ornstein-Zernicke behaviour).
4408
4409For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4410
4411.. image:: ..\img\olddocs\image040.gif
4412
4413===============================  ========  =============
4414Parameter name                   Units     Default value
4415===============================  ========  =============
4416scale_1 (=A)                     None      10
4417scale_2 (=C)                     None      1
44181ength_1 (=correlation length1)  |Ang|     100
44191ength_2 (=correlation length2)  |Ang|     10
4420exponent_1 (=n)                  None      3
4421exponent_2 (=m)                  None      2
4422background (=B)                  |cm^-1|   0.1
4423===============================  ========  =============
4424
4425.. image:: ..\img\olddocs\image217.jpg
4426
4427*Figure. 1D plot using the default values (w/500 data points).*
4428
4429REFERENCE
4430
4431None.
4432
4433
4434
4435.. _TwoPowerLaw:
4436
4437**2.2.24. TwoPowerLaw (Model)**
4438
4439This model calculates an empirical functional form for SAS data characterized by two power laws.
4440
4441The returned value is scaled to units of |cm^-1|, absolute scale.
4442
4443*2.2.24.1. Definition*
4444
4445The scattering intensity *I(q)* is calculated as
4446
4447.. image:: ..\img\olddocs\image218.jpg
4448
4449where *qc* is the location of the crossover from one slope to the other. The scaling *coef_A* sets the overall
4450intensity of the lower *q* power law region. The scaling of the second power law region is then automatically scaled to
4451match the first.
4452
4453**NB: Be sure to enter the power law exponents as positive values!**
4454
4455For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4456
4457.. image:: ..\img\olddocs\image040.gif
4458
4459==============  ========  =============
4460Parameter name  Units     Default value
4461==============  ========  =============
4462coef_A          None      1.0
4463qc              |Ang^-1|  0.04
4464power_1 (=m1)   None      4
4465power_2 (=m2)   None      4
4466background      |cm^-1|   0.0
4467==============  ========  =============
4468
4469.. image:: ..\img\olddocs\image219.jpg
4470
4471*Figure. 1D plot using the default values (w/500 data points).*
4472
4473REFERENCE
4474
4475None.
4476
4477
4478
4479.. _UnifiedPowerRg:
4480
4481**2.2.25. UnifiedPowerRg (Beaucage Model)**
4482
4483This model deploys the empirical multiple level unified Exponential/Power-law fit method developed by G Beaucage. Four
4484functions are included so that 1, 2, 3, or 4 levels can be used. In addition a 0 level has been added which simply
4485calculates
4486
4487*I(q)* = *scale* / *q* + *background*
4488
4489The returned value is scaled to units of |cm^-1|, absolute scale. 
4490
4491The Beaucage method is able to reasonably approximate the scattering from many different types of particles, including
4492fractal clusters, random coils (Debye equation), ellipsoidal particles, etc. 
4493
4494*2.2.25.1 Definition*
4495
4496The empirical fit function is 
4497
4498.. image:: ..\img\olddocs\image220.jpg
4499
4500For each level, the four parameters *Gi*, *Rg,i*, *Bi* and *Pi* must be chosen. 
4501
4502For example, to approximate the scattering from random coils (Debye_ equation), set *Rg,i* as the Guinier radius,
4503*Pi* = 2, and *Bi* = 2 *Gi* / *Rg,i* 
4504
4505See the references for further information on choosing the parameters.
4506
4507For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4508
4509.. image:: ..\img\olddocs\image040.gif
4510
4511==============  ========  =============
4512Parameter name  Units     Default value
4513==============  ========  =============
4514scale           None      1.0
4515Rg2             |Ang|     21
4516power2          None      2
4517G2              |cm^-1|   3
4518B2              |cm^-1|   0.0006
4519Rg1             |Ang|     15.8
4520power1          None      4
4521G1              |cm^-1|   400
4522B1              |cm^-1|   4.5e-6                |
4523background      |cm^-1|   0.0
4524==============  ========  =============
4525
4526.. image:: ..\img\olddocs\image221.jpg
4527
4528*Figure. 1D plot using the default values (w/500 data points).*
4529
4530REFERENCE
4531
4532G Beaucage, *J. Appl. Cryst.*, 28 (1995) 717-728
4533
4534G Beaucage, *J. Appl. Cryst.*, 29 (1996) 134-146
4535
4536
4537
4538.. _LineModel:
4539
4540**2.2.26. LineModel**
4541
4542This calculates the simple linear function
4543
4544.. image:: ..\img\olddocs\image222.PNG
4545
4546**NB: For 2D plots,** *I(q)* = *I(qx)*\ *\ *I(qy)*, **which is a different definition to other shape independent models.**
4547
4548==============  ==============  =============
4549Parameter name  Units           Default value
4550==============  ==============  =============
4551A               |cm^-1|         1.0
4552B               |Ang|\ |cm^-1|  1.0
4553==============  ==============  =============
4554
4555REFERENCE
4556
4557None.
4558
4559
4560
4561.. _GelFitModel:
4562
4563**2.2.27. GelFitModel**
4564
4565*This model was implemented by an interested user!*
4566
4567Unlike a concentrated polymer solution, the fine-scale polymer distribution in a gel involves at least two
4568characteristic length scales, a shorter correlation length (*a1*) to describe the rapid fluctuations in the position
4569of the polymer chains that ensure thermodynamic equilibrium, and a longer distance (denoted here as *a2*) needed to
4570account for the static accumulations of polymer pinned down by junction points or clusters of such points. The latter
4571is derived from a simple Guinier function.
4572
4573Also see the GaussLorentzGel_ Model.
4574
4575*2.2.27.1. Definition*
4576
4577The scattered intensity *I(q)* is calculated as
4578
4579.. image:: ..\img\olddocs\image233.gif
4580
4581where
4582
4583.. image:: ..\img\olddocs\image234.gif
4584
4585Note that the first term reduces to the Ornstein-Zernicke equation when *D* = 2; ie, when the Flory exponent is 0.5
4586(theta conditions). In gels with significant hydrogen bonding *D* has been reported to be ~2.6 to 2.8.
4587
4588============================  ========  =============
4589Parameter name                Units     Default value
4590============================  ========  =============
4591Background                    |cm^-1|   0.01
4592Guinier scale    (= *I(0)G*)  |cm^-1|   1.7
4593Lorentzian scale (= *I(0)L*)  |cm^-1|   3.5
4594Radius of gyration  (= *Rg*)  |Ang|     104
4595Fractal exponent     (= *D*)  None      2
4596Correlation length  (= *a1*)  |Ang|     16
4597============================  ========  =============
4598
4599.. image:: ..\img\olddocs\image235.gif
4600
4601*Figure. 1D plot using the default values (w/300 data points).*
4602
4603REFERENCE
4604
4605Mitsuhiro Shibayama, Toyoichi Tanaka, Charles C Han, J. Chem. Phys. 1992, 97 (9), 6829-6841
4606
4607Simon Mallam, Ferenc Horkay, Anne-Marie Hecht, Adrian R Rennie, Erik Geissler, Macromolecules 1991, 24, 543-548
4608
4609
4610
4611.. _StarPolymer:
4612
4613**2.2.28. Star Polymer with Gaussian Statistics**
4614
4615This model is also known as the Benoit Star model.
4616
4617*2.2.28.1. Definition*
4618
4619For a star with *f* arms:
4620
4621.. image:: ..\img\olddocs\star1.png
4622
4623where
4624
4625.. image:: ..\img\olddocs\star2.png
4626
4627and
4628
4629.. image:: ..\img\olddocs\star3.png
4630
4631is the square of the ensemble average radius-of-gyration of an arm.
4632
4633REFERENCE
4634
4635H Benoit,   J. Polymer Science.,  11, 596-599  (1953)
4636
4637
4638
4639.. _ReflectivityModel:
4640
4641**2.2.29. ReflectivityModel**
4642
4643*This model was contributed by an interested user!*
4644
4645This model calculates **reflectivity** using the Parrett algorithm.
4646
4647Up to nine film layers are supported between Bottom(substrate) and Medium(Superstrate) where the neutron enters the
4648first top film. Each of the layers are composed of
4649
4650[œ of the interface (from the previous layer or substrate) + flat portion + œ of the interface (to the next layer or medium)]
4651
4652Two simple functions are provided to describe the interfacial density distribution; a linear function and an error
4653function. The interfacial thickness is equivalent to (-2.5 |sigma| to +2.5 |sigma| for the error function, where
4654|sigma| = roughness).
4655
4656Also see ReflectivityIIModel_.
4657
4658.. image:: ..\img\olddocs\image231.bmp
4659
4660*Figure. Comparison (using the SLD profile below) with the NIST web calculation (circles)*
4661http://www.ncnr.nist.gov/resources/reflcalc.html
4662
4663.. image:: ..\img\olddocs\image232.gif
4664
4665*Figure. SLD profile used for the calculation (above).*
4666
4667REFERENCE
4668
4669None.
4670
4671
4672
4673.. _ReflectivityIIModel:
4674
4675**2.2.30. ReflectivityIIModel**
4676
4677*This model was contributed by an interested user!*
4678
4679This **reflectivity** model is a more flexible version of ReflectivityModel_. More interfacial density
4680functions are supported, and the number of points (*npts_inter*) for each interface can be chosen.
4681
4682The SLD at the interface between layers, |rho|\ *inter_i*, is calculated with a function chosen by a user, where the
4683available functions are
4684
46851) Erf
4686
4687.. image:: ..\img\olddocs\image051.gif
4688
46892) Power-Law
4690
4691.. image:: ..\img\olddocs\image050.gif
4692
46933) Exp
4694
4695.. image:: ..\img\olddocs\image049.gif
4696
4697The constant *A* in the expressions above (but the parameter *nu* in the model!) is an input.
4698
4699REFERENCE
4700
4701None.
4702
4703
4704
47052.3 Structure-factor Functions
4706------------------------------
4707
4708The information in this section originated from NIST SANS package.
4709
4710.. _HardSphereStructure:
4711
4712**2.3.1. HardSphereStructure Factor**
4713
4714This calculates the interparticle structure factor for monodisperse spherical particles interacting through hard
4715sphere (excluded volume) interactions.
4716
4717The calculation uses the Percus-Yevick closure where the interparticle potential is
4718
4719.. image:: ..\img\olddocs\image223.PNG
4720
4721where *r* is the distance from the center of the sphere of a radius *R*.
4722
4723For a 2D plot, the wave transfer is defined as
4724
4725.. image:: ..\img\olddocs\image040.gif
4726
4727==============  ========  =============
4728Parameter name  Units     Default value
4729==============  ========  =============
4730effect_radius   |Ang|     50.0
4731volfraction     None      0.2
4732==============  ========  =============
4733
4734.. image:: ..\img\olddocs\image224.jpg
4735
4736*Figure. 1D plot using the default values (in linear scale).*
4737
4738REFERENCE
4739
4740J K Percus, J Yevick, *J. Phys. Rev.*, 110, (1958) 1
4741
4742
4743
4744.. _SquareWellStructure:
4745
4746**2.3.2. SquareWellStructure Factor**
4747
4748This calculates the interparticle structure factor for a square well fluid spherical particles. The mean spherical
4749approximation (MSA) closure was used for this calculation, and is not the most appropriate closure for an attractive
4750interparticle potential. This solution has been compared to Monte Carlo simulations for a square well fluid, showing
4751this calculation to be limited in applicability to well depths |epsilon| < 1.5 kT and volume fractions |phi| < 0.08.
4752
4753Positive well depths correspond to an attractive potential well. Negative well depths correspond to a potential
4754"shoulder", which may or may not be physically reasonable.
4755
4756The well width (*l*\ ) is defined as multiples of the particle diameter (2\*\ *R*\ )
4757
4758The interaction potential is:
4759
4760.. image:: ..\img\olddocs\image225.PNG
4761
4762where *r* is the distance from the center of the sphere of a radius *R*.
4763
4764For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4765
4766.. image:: ..\img\olddocs\image040.gif
4767
4768==============  =========  =============
4769Parameter name  Units      Default value
4770==============  =========  =============
4771effect_radius   |Ang|      50.0
4772volfraction     None       0.04
4773welldepth       kT         1.5
4774wellwidth       diameters  1.2
4775==============  =========  =============
4776
4777.. image:: ..\img\olddocs\image226.jpg
4778
4779*Figure. 1D plot using the default values (in linear scale).*
4780
4781REFERENCE
4782
4783R V Sharma, K C Sharma, *Physica*, 89A (1977) 213
4784
4785
4786
4787.. _HayterMSAStructure:
4788
4789**2.3.3. HayterMSAStructure Factor**
4790
4791This is an implementation of the Rescaled Mean Spherical Approximation which calculates the structure factor (the
4792Fourier transform of the pair correlation function *g(r)*) for a system of charged, spheroidal objects in a
4793dielectric medium. When combined with an appropriate form factor (such as sphere,core+shell, ellipsoid, etc), this
4794allows for inclusion of the interparticle interference effects due to screened coulomb repulsion between charged particles.
4795
4796**This routine only works for charged particles**. If the charge is set to zero the routine will self-destruct!
4797For non-charged particles use a hard sphere potential.
4798
4799The salt concentration is used to compute the ionic strength of the solution which in turn is used to compute the Debye
4800screening length. At present there is no provision for entering the ionic strength directly nor for use of any
4801multivalent salts. The counterions are also assumed to be monovalent.
4802
4803For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4804
4805.. image:: ..\img\olddocs\image040.gif
4806
4807==============  ========  =============
4808Parameter name  Units     Default value
4809==============  ========  =============
4810effect_radius   |Ang|     20.8
4811charge          *e*       19
4812volfraction     None      0.2
4813temperature     K         318
4814salt conc       M         0
4815dielectconst    None      71.1
4816==============  ========  =============
4817
4818.. image:: ..\img\olddocs\image227.jpg
4819
4820*Figure. 1D plot using the default values (in linear scale).*
4821
4822REFERENCE
4823
4824J B Hayter and J Penfold, *Molecular Physics*, 42 (1981) 109-118
4825
4826J P Hansen and J B Hayter, *Molecular Physics*, 46 (1982) 651-656
4827
4828
4829.. _StickyHSStructure:
4830
4831**2.3.4. StickyHSStructure Factor**
4832
4833This calculates the interparticle structure factor for a hard sphere fluid with a narrow attractive well. A perturbative
4834solution of the Percus-Yevick closure is used. The strength of the attractive well is described in terms of "stickiness"
4835as defined below. The returned value is a dimensionless structure factor, *S(q)*.
4836
4837The perturb (perturbation parameter), |epsilon|, should be held between 0.01 and 0.1. It is best to hold the
4838perturbation parameter fixed and let the "stickiness" vary to adjust the interaction strength. The stickiness, |tau|,
4839is defined in the equation below and is a function of both the perturbation parameter and the interaction strength.
4840|tau| and |epsilon| are defined in terms of the hard sphere diameter (|sigma| = 2\*\ *R*\ ), the width of the square
4841well, |bigdelta| (same units as *R*), and the depth of the well, *Uo*, in units of kT. From the definition, it is clear
4842that smaller |tau| means stronger attraction.
4843
4844.. image:: ..\img\olddocs\image228.PNG
4845
4846where the interaction potential is
4847
4848.. image:: ..\img\olddocs\image229.PNG
4849
4850The Percus-Yevick (PY) closure was used for this calculation, and is an adequate closure for an attractive interparticle
4851potential. This solution has been compared to Monte Carlo simulations for a square well fluid, with good agreement.
4852
4853The true particle volume fraction, |phi|, is not equal to *h*, which appears in most of the reference. The two are
4854related in equation (24) of the reference. The reference also describes the relationship between this perturbation
4855solution and the original sticky hard sphere (or adhesive sphere) model by Baxter.
4856
4857NB: The calculation can go haywire for certain combinations of the input parameters, producing unphysical solutions - in
4858this case errors are reported to the command window and the *S(q)* is set to -1 (so it will disappear on a log-log
4859plot). Use tight bounds to keep the parameters to values that you know are physical (test them) and keep nudging them
4860until the optimization does not hit the constraints.
4861
4862For 2D data: The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
4863
4864.. image:: ..\img\olddocs\image040.gif
4865
4866==============  ========  =============
4867Parameter name  Units     Default value
4868==============  ========  =============
4869effect_radius   |Ang|     50
4870perturb         None      0.05
4871volfraction     None      0.1
4872stickiness      K         0.2
4873==============  ========  =============
4874
4875.. image:: ..\img\olddocs\image230.jpg
4876
4877*Figure. 1D plot using the default values (in linear scale).*
4878
4879REFERENCE
4880
4881S V G Menon, C Manohar, and K S Rao, *J. Chem. Phys.*, 95(12) (1991) 9186-9190
4882
4883
4884
48852.4 Customised Functions
4886------------------------------
4887
4888
4889Customized model functions can be redefined or added to by users (See SansView tutorial for details).
4890
4891.. _testmodel:
4892
4893**2.4.1. testmodel**
4894
4895This function, as an example of a user defined function, calculates
4896
4897*I(q)* = *A* + *B* cos(2\ *q*\ ) + *C* sin(2\ *q*\ )
4898
4899
4900
4901.. _testmodel_2:
4902
4903**2.4.2. testmodel_2**
4904
4905This function, as an example of a user defined function, calculates
4906
4907*I(q)* = *scale* * sin(*f*\ )/*f*
4908
4909where
4910
4911*f* = *A* + *Bq* + *Cq*\ :sup:`2` + *Dq*\ :sup:`3` + *Eq*\ :sup:`4` + *Fq*\ :sup:`5`
4912
4913
4914
4915.. _sum_p1_p2:
4916
4917**2.4.3. sum_p1_p2**
4918
4919This function, as an example of a user defined function, calculates
4920
4921*I(q)* = *scale_factor* \* (CylinderModel + PolymerExclVolumeModel)
4922
4923To make your own (*p1 + p2*) model, select 'Easy Custom Sum' from the Fitting menu, or modify and compile the file
4924named 'sum_p1_p2.py' from 'Edit Custom Model' in the 'Fitting' menu.
4925
4926NB: Summing models only works only for single functional models (ie, single shell models, two-component RPA models, etc).
4927
4928
4929
4930.. _sum_Ap1_1_Ap2:
4931
4932**2.4.4. sum_Ap1_1_Ap2**
4933
4934This function, as an example of a user defined function, calculates
4935
4936*I(q)* = (*scale_factor* \* CylinderModel + (1 - *scale_factor*\ ) \* PolymerExclVolume model)
4937
4938To make your own (*A*\ * *p1* + (1-*A*) \* *p2*) model, modify and compile the file named 'sum_Ap1_1_Ap2.py' from
4939'Edit Custom Model' in the 'Fitting' menu.
4940
4941NB: Summing models only works only for single functional models (ie, single shell models, two-component RPA models, etc).
4942
4943
4944
4945.. _polynomial5:
4946
4947**2.4.5. polynomial5**
4948
4949This function, as an example of a user defined function, calculates
4950
4951*I(q)* = *A* + *Bq* + *Cq*\ :sup:`2` + *Dq*\ :sup:`3` + *Eq*\ :sup:`4` + *Fq*\ :sup:`5`
4952
4953This model can be modified and compiled from 'Edit Custom Model' in the 'Fitting' menu.
4954
4955
4956
4957.. _sph_bessel_jn:
4958
4959**2.4.6. sph_bessel_jn**
4960
4961This function, as an example of a user defined function, calculates
4962
4963*I(q)* = *C* \* *sph_jn(Ax+B)+D*
4964
4965where *sph_jn* is a spherical Bessel function of order *n*.
4966
4967This model can be modified and compiled from 'Edit Custom Model' in the 'Fitting' menu.
Note: See TracBrowser for help on using the repository browser.