Changeset 1dd2854 in sasmodels
- Timestamp:
- Mar 20, 2016 10:31:37 AM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c
- Parents:
- 0cc31e1 (diff), 6794301 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- sasmodels
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/fractal_core_shell.c
r7d4b2ae r6794301 47 47 double qr = q*radius; 48 48 49 double t1 = frac_dim* exp(lanczos_gamma(frac_1))*sin(frac_1*atan(q*cor_length));49 double t1 = frac_dim*sas_gamma(frac_1)*sin(frac_1*atan(q*cor_length)); 50 50 double t2 = (1.0 + 1.0/(q*cor_length)/(q*cor_length)); 51 51 double t3 = pow(qr, frac_dim) * pow(t2, (frac_1/2.0)); -
sasmodels/models/fractal_core_shell.py
raa2edb2 r6794301 73 73 # pylint: enable=bad-whitespace, line-too-long 74 74 75 source = ["lib/sph_j1c.c", "lib/ lanczos_gamma.c", "lib/core_shell.c", "fractal_core_shell.c"]75 source = ["lib/sph_j1c.c", "lib/sas_gamma.c", "lib/core_shell.c", "fractal_core_shell.c"] 76 76 77 77 demo = dict(scale=0.05, -
sasmodels/models/mass_fractal.c
r61fd21d r6794301 28 28 //calculate S(q) 29 29 double mmo = mass_dim-1.0; 30 double sq = exp(lanczos_gamma(mmo))*sin((mmo)*atan(q*cutoff_length));30 double sq = sas_gamma(mmo)*sin((mmo)*atan(q*cutoff_length)); 31 31 sq *= pow(cutoff_length, mmo); 32 32 sq /= pow((1.0 + (q*cutoff_length)*(q*cutoff_length)),(mmo/2.0)); -
sasmodels/models/mass_fractal.py
raa2edb2 r6794301 85 85 # pylint: enable=bad-whitespace, line-too-long 86 86 87 source = ["lib/sph_j1c.c", "lib/ lanczos_gamma.c", "mass_fractal.c"]87 source = ["lib/sph_j1c.c", "lib/sas_gamma.c", "mass_fractal.c"] 88 88 89 89 demo = dict(scale=1, background=0, -
sasmodels/models/surface_fractal.c
r9c461c7 r6794301 26 26 //calculate S(q) 27 27 mmo = 5.0 - surface_dim; 28 sq = exp(lanczos_gamma(mmo))*sin(-(mmo)*atan(q*cutoff_length));28 sq = sas_gamma(mmo)*sin(-(mmo)*atan(q*cutoff_length)); 29 29 sq *= pow(cutoff_length, mmo); 30 30 sq /= pow((1.0 + (q*cutoff_length)*(q*cutoff_length)),(mmo/2.0)); -
sasmodels/models/surface_fractal.py
raa2edb2 r6794301 87 87 # pylint: enable=bad-whitespace, line-too-long 88 88 89 source = ["lib/sph_j1c.c", "lib/ lanczos_gamma.c", "surface_fractal.c"]89 source = ["lib/sph_j1c.c", "lib/sas_gamma.c", "surface_fractal.c"] 90 90 91 91 demo = dict(scale=1, background=0, -
sasmodels/resolution.py
r2f63032 r8b935d1 689 689 self.pars = TEST_PARS_PINHOLE_SPHERE 690 690 from sasmodels import core 691 from sasmodels.models import sphere 692 self.model = core.load_model(sphere, dtype='double') 691 self.model = core.load_model("sphere", dtype='double') 693 692 694 693 def _eval_sphere(self, pars, resolution): -
sasmodels/models/correlation_length.py
r326281f r0cc31e1 16 16 incoherent background B and the two exponents n and m are used as fitting 17 17 parameters. (Respectively $porod\_scale$, $lorentz\_scale$, $background$, $exponent\_p$ and 18 $exponent\_l$ in the parameter list.) The remaining parameter \ xiis a correlation18 $exponent\_l$ in the parameter list.) The remaining parameter \ |xi|\ is a correlation 19 19 length for the polymer chains. Note that when m=2 this functional form becomes the 20 20 familiar Lorentzian function. Some interpretation of the values of A and C may be -
sasmodels/models/elliptical_cylinder.py
r74fd96f r0cc31e1 12 12 .. figure:: img/elliptical_cylinder_geometry.png 13 13 14 Elliptical cylinder geometry $a$ = $r_{minor}$ and \ nu= $axis\_ratio$ = $r_{major} / r_{minor}$14 Elliptical cylinder geometry $a$ = $r_{minor}$ and \ |nu|\ = $axis\_ratio$ = $r_{major} / r_{minor}$ 15 15 16 16 The function calculated is -
sasmodels/models/fuzzy_sphere.py
raa2edb2 r0cc31e1 19 19 20 20 A(q) = \frac{3\left[\sin(qR) - qR \cos(qR)\right]}{(qR)^3} 21 \exp\left(\frac{-( o_{fuzzy}q)^2}{2}\right)21 \exp\left(\frac{-(\sigma_{fuzzy}q)^2}{2}\right) 22 22 23 23 Here *|A(q)|*:sup:`2`\ is the form factor, *P(q)*. The scale is equivalent to the … … 26 26 solvent. 27 27 28 Poly-dispersion in radius and in fuzziness is provided for. 28 Poly-dispersion in radius and in fuzziness is provided for, though the fuzziness 29 must be kept much smaller than the sphere radius for meaningful results. 29 30 30 31 … … 65 66 or just volume fraction for absolute scale data 66 67 radius: radius of the solid sphere 67 fuzziness = the STD of the height offuzzy interfacial68 fuzziness = the standard deviation of the fuzzy interfacial 68 69 thickness (ie., so-called interfacial roughness) 69 70 sld: the SLD of the sphere … … 76 77 # pylint: disable=bad-whitespace,line-too-long 77 78 # ["name", "units", default, [lower, upper], "type","description"], 78 parameters = [["sld", "1e-6/Ang^2", 1, [-inf, inf], "", " Layerscattering length density"],79 ["s olvent_sld", "1e-6/Ang^2", 3, [-inf, inf], "", "Solvent scattering length density"],79 parameters = [["sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Particle scattering length density"], 80 ["sld_solvent", "1e-6/Ang^2", 3, [-inf, inf], "", "Solvent scattering length density"], 80 81 ["radius", "Ang", 60, [0, inf], "volume", "Sphere radius"], 81 ["fuzziness", "Ang", 10, [0, inf], "", " The STD of the height of fuzzy interfacial"],82 ["fuzziness", "Ang", 10, [0, inf], "", "std deviation of Gaussian convolution for interface (must be << radius)"], 82 83 ] 83 84 # pylint: enable=bad-whitespace,line-too-long … … 95 96 const double bes = sph_j1c(qr); 96 97 const double qf = q*fuzziness; 97 const double fq = bes * (sld - s olvent_sld) * form_volume(radius) * exp(-0.5*qf*qf);98 const double fq = bes * (sld - sld_solvent) * form_volume(radius) * exp(-0.5*qf*qf); 98 99 return 1.0e-4*fq*fq; 99 100 """ … … 102 103 // never called since no orientation or magnetic parameters. 103 104 //return -1.0; 104 return Iq(sqrt(qx*qx + qy*qy), sld, s olvent_sld, radius, fuzziness);105 return Iq(sqrt(qx*qx + qy*qy), sld, sld_solvent, radius, fuzziness); 105 106 """ 106 107 … … 114 115 115 116 demo = dict(scale=1, background=0.001, 116 sld=1, s olvent_sld=3,117 sld=1, sld_solvent=3, 117 118 radius=60, 118 119 fuzziness=10, … … 121 122 122 123 oldname = "FuzzySphereModel" 123 oldpars = dict(sld='sldSph', s olvent_sld='sldSolv', radius='radius', fuzziness='fuzziness')124 oldpars = dict(sld='sldSph', sld_solvent='sldSolv', radius='radius', fuzziness='fuzziness') 124 125 125 126
Note: See TracChangeset
for help on using the changeset viewer.