Changeset b0c4271 in sasmodels
- Timestamp:
- Oct 5, 2016 9:40:41 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 63e9cd8
- Parents:
- bb2d187
- Location:
- sasmodels/models
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/adsorbed_layer.py
r52ec91e rb0c4271 1 #adsorbed_layer model 2 #conversion of Core2ndMomentModel.py 3 #converted by Steve King, Mar 2016 1 r""" 2 Definition 3 ---------- 4 4 5 r"""6 5 This model describes the scattering from a layer of surfactant or polymer 7 6 adsorbed on large, smooth, notionally spherical particles under the conditions … … 19 18 the mean of the density distribution (ie, the distance of the centre-of-mass 20 19 of the distribution from the interface), $\sigma = \sqrt{t^2/12}$. 21 22 Definition23 ----------24 20 25 21 .. math:: … … 44 40 calculation is exact). 45 41 42 The code for this model is based originally on a a fortran implementation by 43 Steve King at ISIS in the SANDRA package c. 1990. 44 46 45 References 47 46 ---------- 48 47 49 S King, P Griffiths, J Hone, and T Cosgrove, 50 *SANS from Adsorbed Polymer Layers*, *Macromol. Symp.*, 190 (2002) 33-42. 48 .. [#] S King, P Griffiths, J Hone, and T Cosgrove, *SANS from Adsorbed Polymer 49 Layers*, *Macromol. Symp.*, 190 (2002) 33-42. 50 51 Authorship and Verification 52 ---------------------------- 53 54 * **Author:** Jae-Hi Cho **Date:** pre 2010 55 * **Last Modified by:** Paul Kienzle **Date:** April 14, 2016 56 * **Last Reviewed by:** Steve King **Date:** March 18, 2016 51 57 """ 52 58 … … 80 86 def Iq(q, second_moment, adsorbed_amount, density_shell, radius, 81 87 volfraction, sld_shell, sld_solvent): 82 # pylint: disable = missing-docstring83 #deltarhosqrd = (sld_shell - sld_solvent) * (sld_shell - sld_solvent)84 #numerator = 6.0 * pi * volfraction * (adsorbed_amount * adsorbed_amount)85 #denominator = (q * q) * (density_shell * density_shell) * radius86 #eterm = exp(-1.0 * (q * q) * (second_moment * second_moment))87 ##scale by 10^-2 for units conversion to cm^-188 #inten = 1.0e-02 * deltarhosqrd * ((numerator / denominator) * eterm)89 88 with errstate(divide='ignore'): 90 89 aa = ((sld_shell - sld_solvent)/density_shell * adsorbed_amount) / q -
sasmodels/models/barbell.py
r2222134 rb0c4271 1 #barbell model2 # Note: model title and parameter table are inserted automatically3 1 r""" 2 Definition 3 ---------- 4 4 5 Calculates the scattering from a barbell-shaped cylinder. Like 5 6 :ref:`capped-cylinder`, this is a sphereocylinder with spherical end … … 7 8 of the end cap radius lying outside of the cylinder. See the diagram for 8 9 the details of the geometry and restrictions on parameter values. 9 10 Definition11 ----------12 10 13 11 .. figure:: img/barbell_geometry.jpg … … 75 73 76 74 .. figure:: img/cylinder_angle_projection.jpg 75 :width: 600px 77 76 78 77 Examples of the angles for oriented pp against the detector plane. … … 81 80 ---------- 82 81 83 H Kaya, *J. Appl. Cryst.*, 37 (2004) 37 223-230 82 .. [#] H Kaya, *J. Appl. Cryst.*, 37 (2004) 37 223-230 83 .. [#] H Kaya and N R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda 84 and errata) 84 85 85 H Kaya and N R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda and errata) 86 Authorship and Verification 87 ---------------------------- 88 89 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 90 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 91 * **Last Reviewed by:** Paul Butler **Date:** March 20, 2016 86 92 """ 87 93 from numpy import inf -
sasmodels/models/bcc_paracrystal.py
r0bef47b rb0c4271 1 #bcc paracrystal model2 #note model title and parameter table are automatically inserted3 #note - calculation requires double precision4 1 r""" 2 Definition 3 ---------- 4 5 5 Calculates the scattering from a **body-centered cubic lattice** with 6 6 paracrystalline distortion. Thermal vibrations are considered to be negligible, 7 7 and the size of the paracrystal is infinitely large. Paracrystalline distortion 8 8 is assumed to be isotropic and characterized by a Gaussian distribution. 9 10 Definition11 ----------12 9 13 10 The scattering intensity $I(q)$ is calculated as … … 23 20 is the paracrystalline structure factor for a body-centered cubic structure. 24 21 25 Equation (1) of the 1990 reference is used to calculate $Z(q)$, using 26 equations (29)-(31) from the 1987 paper for $Z1$, $Z2$, and $Z3$. 22 Equation (1) of the 1990 reference\ [#CIT1990]_ is used to calculate $Z(q)$, 23 using equations (29)-(31) from the 1987 paper\ [#CIT1987]_ for $Z1$, $Z2$, and 24 $Z3$. 27 25 28 26 The lattice correction (the occupied volume of the lattice) for a … … 79 77 The 2D (Anisotropic model) is based on the reference below where $I(q)$ is 80 78 approximated for 1d scattering. Thus the scattering pattern for 2D may not 81 be accurate. Note that we are not responsible for any incorrectness of the 2D 82 model computation. 79 be accurate. 83 80 84 81 .. figure:: img/bcc_angle_definition.png … … 89 86 ---------- 90 87 91 Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 92 (Original Paper) 88 .. [#CIT1987] Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 89 (Original Paper) 90 .. [#CIT1990] Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 91 (Corrections to FCC and BCC lattice structure calculation) 93 92 94 Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 95 (Corrections to FCC and BCC lattice structure calculation) 93 Authorship and Verification 94 ---------------------------- 95 96 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 97 * **Last Modified by:** Paul Butler **Date:** September 29, 2016 98 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 96 99 """ 97 100 … … 109 112 category = "shape:paracrystal" 110 113 114 #note - calculation requires double precision 111 115 single = False 112 116 -
sasmodels/models/be_polyelectrolyte.py
r2c74c11 rb0c4271 1 1 r""" 2 This model calculates the structure factor of a polyelectrolyte solution with3 the RPA expression derived by Borue and Erukhimovich.4 5 2 Definition 6 3 ---------- 7 8 The scattering intensity $I(q)$ is calculated as 4 This model calculates the structure factor of a polyelectrolyte solution with 5 the RPA expression derived by Borue and Erukhimovich\ [#Borue]_. The scattering intensity 6 $I(q)$ is calculated as 9 7 10 8 .. math:: … … 36 34 ---------- 37 35 38 V Y Borue, I Y Erukhimovich, *Macromolecules*, 21 (1988) 3240 36 .. [#Borue] V Y Borue, I Y Erukhimovich, *Macromolecules*, 21 (1988) 3240 37 .. [#] J F Joanny, L Leibler, *Journal de Physique*, 51 (1990) 545 38 .. [#] A Moussaid, F Schosseler, J P Munch, S Candau, *J. Journal de Physique 39 II France*, 3 (1993) 573 40 .. [#] E Raphael, J F Joanny, *Europhysics Letters*, 11 (1990) 179 39 41 40 J F Joanny, L Leibler, *Journal de Physique*, 51 (1990) 545 42 Authorship and Verification 43 ---------------------------- 41 44 42 A Moussaid, F Schosseler, J P Munch, S Candau, 43 *J. Journal de Physique II France*, 3 (1993) 573 44 45 E Raphael, J F Joanny, *Europhysics Letters*, 11 (1990) 179 46 45 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 46 * **Last Modified by:** Paul Kienzle **Date:** July 24, 2016 47 * **Last Reviewed by:** Piotr rozyczko **Date:** January 27, 2016 47 48 """ 48 49 -
sasmodels/models/binary_hard_sphere.py
r63c6a08 rb0c4271 1 1 r""" 2 3 2 Definition 4 3 ---------- 4 5 5 The binary hard sphere model provides the scattering intensity, for binary 6 6 mixture of hard spheres including hard sphere interaction between those … … 61 61 ---------- 62 62 63 N W Ashcroft and D C Langreth, *Physical Review*, 156 (1967) 685-692 64 [Errata found in *Phys. Rev.* 166 (1968) 934] 63 .. [#] N W Ashcroft and D C Langreth, *Physical Review*, 156 (1967) 685-692 64 [Errata found in *Phys. Rev.* 166 (1968) 934] 65 .. [#] S R Kline, *J Appl. Cryst.*, 39 (2006) 895 65 66 66 S R Kline, *J Appl. Cryst.*, 39 (2006) 895 67 Authorship and Verification 68 ---------------------------- 67 69 68 **Author:** NIST IGOR/DANSE **on:** pre 2010 69 70 **Last Modified by:** Paul Butler **on:** March 20, 2016 71 72 **Last Reviewed by:** Paul Butler **on:** March 20, 2016 70 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 71 * **Last Modified by:** Paul Butler **Date:** March 20, 2016 72 * **Last Reviewed by:** Paul Butler **Date:** March 20, 2016 73 73 """ 74 74 -
sasmodels/models/broad_peak.py
r40a87fa rb0c4271 1 1 r""" 2 Definition 3 ---------- 4 2 5 This model calculates an empirical functional form for SAS data characterized 3 6 by a broad scattering peak. Many SAS spectra are characterized by a broad peak … … 9 12 between the scattering inhomogeneities (such as in lamellar, cylindrical, or 10 13 spherical morphologies, or for bicontinuous structures). 11 12 Definition13 ----------14 14 15 15 The scattering intensity $I(q)$ is calculated as … … 33 33 None. 34 34 35 *2013/09/09 - Description reviewed by King, S and Parker, P.* 35 Authorship and Verification 36 ---------------------------- 37 38 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 39 * **Last Modified by:** Paul kienle **Date:** July 24, 2016 40 * **Last Reviewed by:** Richard Heenan **Date:** March 21, 2016 36 41 """ 37 42 -
sasmodels/models/capped_cylinder.py
r2222134 rb0c4271 1 1 r""" 2 Definitions 3 ----------- 4 2 5 Calculates the scattering from a cylinder with spherical section end-caps. 3 6 Like :ref:`barbell`, this is a sphereocylinder with end caps that have a … … 6 9 lens when the length of the cylinder $L=0$. See the diagram for the details 7 10 of the geometry and restrictions on parameter values. 8 9 Definitions10 -----------11 11 12 12 .. figure:: img/capped_cylinder_geometry.jpg … … 76 76 77 77 .. figure:: img/cylinder_angle_projection.jpg 78 :width: 600px 78 79 79 80 Examples of the angles for oriented 2D cylinders against the detector plane. … … 82 83 ---------- 83 84 84 H Kaya, *J. Appl. Cryst.*, 37 (2004) 223-230 85 .. [#] H Kaya, *J. Appl. Cryst.*, 37 (2004) 223-230 86 .. [#] H Kaya and N-R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda 87 and errata) 85 88 86 H Kaya and N-R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda and errata) 89 Authorship and Verification 90 ---------------------------- 91 92 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 93 * **Last Modified by:** Paul Butler **Date:** September 30, 2016 94 * **Last Reviewed by:** Richard Heenan **Date:** March 19, 2016 87 95 """ 88 96 from numpy import inf -
sasmodels/models/core_multi_shell.py
r7b68dc5 rb0c4271 33 33 References 34 34 ---------- 35 See the :ref:`core-shell-sphere` model documentation.36 35 37 L A Feigin and D I Svergun, 38 *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*,39 Plenum Press, New York, 1987.36 .. [#] See the :ref:`core-shell-sphere` model documentation. 37 .. [#] L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, 38 Plenum Press, New York, 1987. 40 39 41 **Author:** NIST IGOR/DANSE **on:** pre 2010 40 Authorship and Verification 41 ---------------------------- 42 42 43 * *Last Modified by:** in progress **on:** March 20, 201644 45 * *Last Reviewed by:** in progress **on:** March 20, 201643 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 44 * **Last Modified by:** Paul Kienzle **Date:** September 12, 2016 45 * **Last Reviewed by:** Under Review **Date:** as of October 5, 2016 46 46 """ 47 47 -
sasmodels/models/core_shell_bicelle.py
r2222134 rb0c4271 1 1 r""" 2 3 2 Definition 4 3 ---------- … … 13 12 .. figure:: img/core_shell_bicelle_geometry.png 14 13 15 (Graphic from DOI: 10.1039/C0NP00002G, note however that the model here16 calculates for rectangular, not curved, rims.)14 Core shell geometry (Graphic from ref [#Matusmori]_). 15 Note however that the model here calculates for rectangular, not curved, rims. 17 16 18 17 The output of the 1D scattering intensity function for randomly oriented … … 28 27 29 28 .. figure:: img/cylinder_angle_projection.jpg 29 :width: 600px 30 30 31 31 Examples of the angles for oriented pp against the detector plane. … … 34 34 ---------- 35 35 36 L A Feigin and D I Svergun, 37 *Structure Analysis by Small-Angle X-Ray and Neutron Scattering,* 38 Plenum Press, New York, (1987) 36 .. [#Matusmori] `N Matsumori and M Murata <http://dx.doi.org/10.1039/C0NP0000 37 2G>`_, *Nat. Prod. Rep.* 27 (2010) 1480-1492 38 .. [#] L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and 39 Neutron Scattering,* Plenum Press, New York, (1987) 40 41 Authorship and Verification 42 ---------------------------- 43 44 * **Author:** NIST IGOR/DANSE **Date:** pre 2010 45 * **Last Modified by:** Paul Butler **Date:** Septmber 30, 2016 46 * **Last Reviewed by:** Under Review **Date:** October 5, 2016 39 47 40 48 """
Note: See TracChangeset
for help on using the changeset viewer.