Changeset 70faf5d in sasview for sansmodels
- Timestamp:
- Apr 15, 2009 9:58:33 AM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b22748b
- Parents:
- 179a411
- Location:
- sansmodels/src/sans/models/c_extensions
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/Hardsphere.h
r25a608f5 r70faf5d 15 15 // 16 16 // R: radius of the Hardsphere particle 17 // V:The volume fraction 17 // V:The volume fraction 18 18 // 19 // Ref: Percus., J. K.,etc., J. Phy. Rev. 19 // Ref: Percus., J. K.,etc., J. Phy. Rev. 20 20 // 1958, 110, 1. 21 21 // </text> 22 //[FIXED]= radius.width 22 //[FIXED]= radius.width 23 23 24 24 25 25 typedef struct { 26 /// Radius of hardsphere [ A]27 // [DEFAULT]=radius=50.0 A26 /// Radius of hardsphere [Å] 27 // [DEFAULT]=radius=50.0 [Å] 28 28 double radius; 29 29 -
sansmodels/src/sans/models/c_extensions/HayterMSA.h
r25579e8 r70faf5d 7 7 //[PYTHONCLASS] = HayterMSAStructure 8 8 //[DISP_PARAMS] = radius 9 //[DESCRIPTION] =<text>To calculate the structure factor (the Fourier transform 10 // of the pair correlation function g(r)) for 11 // a system of charged, spheroidal objects in 12 // a dielectric medium. When combined with an 13 // appropriate form factor, this allows 14 // for inclusion of the interparticle 15 // interference effects due to screened coulomb 9 //[DESCRIPTION] =<text>To calculate the structure factor (the Fourier transform 10 // of the pair correlation function g(r)) for 11 // a system of charged, spheroidal objects in 12 // a dielectric medium. When combined with an 13 // appropriate form factor, this allows 14 // for inclusion of the interparticle 15 // interference effects due to screened coulomb 16 16 // repulsion between charged particles. 17 17 // (note: charge > 0 required.) 18 18 // 19 // Ref: JP Hansen and JB Hayter, Molecular 19 // Ref: JP Hansen and JB Hayter, Molecular 20 20 // Physics 46, 651-656 (1982). 21 21 // 22 22 // </text> 23 //[FIXED]= radius.width 24 23 //[FIXED]= radius.width 24 25 25 typedef struct { 26 /// Radius of particle [ A]27 // [DEFAULT]=radius=20.75 A26 /// Radius of particle [Å] 27 // [DEFAULT]=radius=20.75 [Å] 28 28 double radius; 29 29 … … 37 37 38 38 /// Temperature [K] 39 // [DEFAULT]=temperature= 318.16 K39 // [DEFAULT]=temperature= 318.16 [K] 40 40 double temperature; 41 41 42 /// Monovalent salt concentration [M] 43 // [DEFAULT]=saltconc= 0 42 /// Monovalent salt concentration [M] 43 // [DEFAULT]=saltconc= 0 [M] 44 44 double saltconc; 45 45 46 /// Dielectric constant of solvent 47 // [DEFAULT]=dielectconst= 71.08 46 /// Dielectric constant of solvent 47 // [DEFAULT]=dielectconst= 71.08 48 48 double dielectconst; 49 49 } HayterMSAParameters; -
sansmodels/src/sans/models/c_extensions/SquareWell.h
r25a608f5 r70faf5d 18 18 // w: well width; multiples of the particle diameter 19 19 // 20 // Ref: Sharma, R. V.; Sharma, K. C., Physica, 20 // Ref: Sharma, R. V.; Sharma, K. C., Physica, 21 21 // 1977, 89A, 213. 22 22 // </text> 23 // [FIXED]= radius.width 23 // [FIXED]= radius.width 24 24 //[ORIENTATION_PARAMS]= <text> </text> 25 25 26 26 27 27 typedef struct { 28 /// Radius of particle [ A]29 // [DEFAULT]=radius=50.0 A28 /// Radius of particle [Å] 29 // [DEFAULT]=radius=50.0 [Å] 30 30 double radius; 31 31 … … 35 35 36 36 /// Well depth [kT] 37 // [DEFAULT]=welldepth= 1.50 kT37 // [DEFAULT]=welldepth= 1.50 [kT] 38 38 double welldepth; 39 39 40 /// Well width 41 // [DEFAULT]=wellwidth= 1.20 40 /// Well width 41 // [DEFAULT]=wellwidth= 1.20 42 42 double wellwidth; 43 43 -
sansmodels/src/sans/models/c_extensions/StickyHS.h
r25579e8 r70faf5d 15 15 // = 0 , r >= 2R +w 16 16 // 17 // R: radius of the hardsphere 17 // R: radius of the hardsphere 18 18 // stickiness = [exp(Uo/kT)]/(12*perturb) 19 19 // perturb = w/(w+ 2R) , 0.01 =< w <= 0.1 … … 21 21 // v: The volume fraction , v > 0 22 22 // 23 // Ref: Menon, S. V. G.,et.al., J. Chem. Phys., 23 // Ref: Menon, S. V. G.,et.al., J. Chem. Phys., 24 24 // 1991, 95(12), 9186-9190. 25 25 // </text> 26 //[FIXED]= radius.width 26 //[FIXED]= radius.width 27 27 typedef struct { 28 /// Radius of hardsphere [ A]29 // [DEFAULT]=radius=50.0 A28 /// Radius of hardsphere [Å] 29 // [DEFAULT]=radius=50.0 [Å] 30 30 double radius; 31 31 -
sansmodels/src/sans/models/c_extensions/core_shell.h
r25a608f5 r70faf5d 7 7 //[PYTHONCLASS] = CoreShellModel 8 8 //[DISP_PARAMS] = radius, thickness 9 //[DESCRIPTION] =<text> Form factor for a monodisperse spherical 10 // particle with a core-shell structure: 11 // The form factor is normalized by the 12 // total particle volume. 13 // 14 // radius: core radius 15 // thickness: shell thickness 9 //[DESCRIPTION] =<text> Form factor for a monodisperse spherical particle with 10 // particle with a core-shell structure: 11 // The form factor is normalized by the 12 // total particle volume. 16 13 // 17 // Ref: Guinier, A. and G. Fournet, 18 // John Wiley and Sons, New York, 1955. 14 // radius: core radius 15 // thickness: shell thickness 16 // 17 // Ref: Guinier, A. and G. Fournet, 18 // John Wiley and Sons, New York, 1955. 19 19 // </text> 20 20 //[FIXED]= <text> thickness.width;radius.width</text> … … 25 25 // [DEFAULT]=scale=1.0 26 26 double scale; 27 /// Core Radius (A)60.028 // [DEFAULT]=radius=60.0 A27 /// Core Radius [Å] 60.0 28 // [DEFAULT]=radius=60.0 [Å] 29 29 double radius; 30 /// Shell Thickness (A)10.031 // [DEFAULT]=thickness=10 A30 /// Shell Thickness [Å] 10.0 31 // [DEFAULT]=thickness=10 [Å] 32 32 double thickness; 33 /// Core SLD (Å-2)1.0e-634 // [DEFAULT]=core_sld=1.0e-6 A-233 /// Core SLD [1/Ų] 1.0e-6 34 // [DEFAULT]=core_sld=1.0e-6 [1/Ų] 35 35 double core_sld; 36 /// Shell SLD (Å-2)2.0e-637 // [DEFAULT]=shell_sld=2.0e-6 A-236 /// Shell SLD [1/Ų] 2.0e-6 37 // [DEFAULT]=shell_sld=2.0e-6 [1/Ų] 38 38 double shell_sld; 39 /// Solvent SLD (Å-2)3.0e-640 // [DEFAULT]=solvent_sld=3.0e-6 A-239 /// Solvent SLD [1/Ų] 3.0e-6 40 // [DEFAULT]=solvent_sld=3.0e-6 [1/Ų] 41 41 double solvent_sld; 42 /// Incoherent Background (cm-1)0.00043 // [DEFAULT]=background=0 cm-142 /// Incoherent Background [1/cm] 0.000 43 // [DEFAULT]=background=0 [1/cm] 44 44 double background; 45 45 } CoreShellParameters; -
sansmodels/src/sans/models/c_extensions/core_shell_cylinder.h
r25a608f5 r70faf5d 8 8 //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi 9 9 //[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg Where:\n\ 10 // f(q)= 2(core_sld- solvant_sld)* Vc*sin[qLcos(alpha/2)]/\n\ 11 // [qLcos(alpha/2)]*J1(qRsin(alpha))/[qRsin(alpha)] +\n 2(shell_sld-solvent_sld)*Vs 12 // *sin[q(L+T)cos(alpha/2)]/[[q(L+T)cos(alpha/2)] 13 // *J1(q(R+T)sin(alpha))/q(R+T)sin(alpha)] 14 // alpha:is the angle between the axis of the cylinder and the q-vector 15 // Vs: the volume of the outer shell 16 // Vc: the volume of the core 17 // L: the length of the core 18 // shell_sld: the scattering length density of the shell 19 // solvent_sld: the scattering length density of the solvent 20 // bkg: the background 21 // T: the thickness 22 // R+T: is the outer radius 23 // L+2T: The total length of the outershell 24 // J1: the first order Bessel function 25 // theta: axis_theta of the cylinder 26 // phi: the axis_phi of the cylinder 27 // </text> 10 // f(q)= 2(core_sld- solvant_sld)* Vc*sin[qLcos(alpha/2)]/\n\ 11 // [qLcos(alpha/2)]*J1(qRsin(alpha))/[qRsin(alpha)] +\n 12 // 2(shell_sld-solvent_sld)*Vs 13 // *sin[q(L+T)cos(alpha/2)]/[[q(L+T)cos(alpha/2)] 14 // *J1(q(R+T)sin(alpha))/q(R+T)sin(alpha)] 15 // alpha:is the angle between the axis of the cylinder 16 // and the q-vector 17 // Vs: the volume of the outer shell 18 // Vc: the volume of the core 19 // L: the length of the core 20 // shell_sld: the scattering length density of the shell 21 // solvent_sld: the scattering length density of the solvent 22 // bkg: the background 23 // T: the thickness 24 // R+T: is the outer radius 25 // L+2T: The total length of the outershell 26 // J1: the first order Bessel function 27 // theta: axis_theta of the cylinder 28 // phi: the axis_phi of the cylinder 29 // </text> 28 30 //[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness_width</text> 29 //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width 31 //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width 30 32 31 33 … … 35 37 double scale; 36 38 37 /// Core radius [ A]38 // [DEFAULT]=radius=20.0 A39 /// Core radius [Å] 40 // [DEFAULT]=radius=20.0 [Å] 39 41 double radius; 40 42 41 /// Shell thickness [ A]42 // [DEFAULT]=thickness=10.0 A43 /// Shell thickness [Å] 44 // [DEFAULT]=thickness=10.0 [Å] 43 45 double thickness; 44 46 45 /// Core length [ A]46 // [DEFAULT]=length=400.0 A47 /// Core length [Å] 48 // [DEFAULT]=length=400.0 [Å] 47 49 double length; 48 50 49 /// Core SLD [ A-2]50 // [DEFAULT]=core_sld=1.0e-6 A-251 /// Core SLD [1/Ų] 52 // [DEFAULT]=core_sld=1.0e-6 [1/Ų] 51 53 double core_sld; 52 54 53 /// Shell SLD [ A-2]54 // [DEFAULT]=shell_sld=4.0e-6 A-255 /// Shell SLD [1/Ų] 56 // [DEFAULT]=shell_sld=4.0e-6 [1/Ų] 55 57 double shell_sld; 56 58 57 /// Solvent SLD [ A-2]58 // [DEFAULT]=solvent_sld=1.0e-6 A-259 /// Solvent SLD [1/Ų] 60 // [DEFAULT]=solvent_sld=1.0e-6 [1/Ų] 59 61 double solvent_sld; 60 62 61 /// Incoherent Background [ cm-1]62 // [DEFAULT]=background=0 cm-163 /// Incoherent Background [1/cm] 64 // [DEFAULT]=background=0 [1/cm] 63 65 double background; 64 66 65 67 /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [rad] 66 // [DEFAULT]=axis_theta=1.57 rad68 // [DEFAULT]=axis_theta=1.57 [rad] 67 69 double axis_theta; 68 70 69 71 /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [rad] 70 // [DEFAULT]=axis_phi=0.0 rad72 // [DEFAULT]=axis_phi=0.0 [rad] 71 73 double axis_phi; 72 74 -
sansmodels/src/sans/models/c_extensions/cylinder.h
r25a608f5 r70faf5d 5 5 * [DISP_PARAMS] = radius, length, cyl_theta, cyl_phi 6 6 [DESCRIPTION] = <text>P(q,alpha)= scale/V*f(q)^(2)+bkg 7 f(q)= 2*(scatter_sld - solvent_sld)*V*sin(qLcos(alpha/2))/[qLcos(alpha/2)]* 8 J1(qRsin(alpha/2))/[qRsin(alpha)] 9 V: Volume of the cylinder 10 R: Radius of the cylinder 11 L: Length of the cylinder 12 J1: The bessel function 13 alpha: angle betweenthe axis of the cylinder and the q-vector 14 for 1D:the ouput is P(q)=scale/V*integral from pi/2 to zero of f(q)^(2)* 15 sin(alpha)*dalpha+ bkg 7 f(q)= 2*(scatter_sld - solvent_sld)*V 8 *sin(qLcos(alpha/2))/[qLcos(alpha/2)] 9 *J1(qRsin(alpha/2))/[qRsin(alpha)] 10 V: Volume of the cylinder 11 R: Radius of the cylinder 12 L: Length of the cylinder 13 J1: The bessel function 14 alpha: angle betweenthe axis of the cylinder 15 and the q-vector for 1D:the ouput is 16 P(q)=scale/V*integral from pi/2 to zero of 17 f(q)^(2)*sin(alpha)*dalpha+ bkg 16 18 </text> 17 19 [FIXED]= <text>cyl_phi.width; cyl_theta.width; length.width;radius.width</text> 18 20 [ORIENTATION_PARAMS]= <text>cyl_phi; cyl_theta; cyl_phi.width; cyl_theta.width</text> 19 21 20 22 21 23 **/ … … 24 26 // [DEFAULT]=scale=1.0 25 27 double scale; 26 /// Radius of the cylinder [ A]27 // [DEFAULT]=radius=20.0 A28 /// Radius of the cylinder [Å] 29 // [DEFAULT]=radius=20.0 [Å] 28 30 double radius; 29 /// Length of the cylinder [ A]30 // [DEFAULT]=length=400.0 A31 /// Length of the cylinder [Å] 32 // [DEFAULT]=length=400.0 [Å] 31 33 double length; 32 /// Contrast [ A-2]33 // [DEFAULT]=contrast=3.0e-6 A-234 /// Contrast [1/Ų] 35 // [DEFAULT]=contrast=3.0e-6 [1/Ų] 34 36 double contrast; 35 /// Incoherent Background (cm-1) 0.00036 // [DEFAULT]=background=0 cm-137 /// Incoherent Background [1/cm] 0.00 38 // [DEFAULT]=background=0.0 [1/cm] 37 39 double background; 38 40 /// Orientation of the cylinder axis w/respect incoming beam [rad] 39 // [DEFAULT]=cyl_theta=1.0 rad41 // [DEFAULT]=cyl_theta=1.0 [rad] 40 42 double cyl_theta; 41 43 /// Orientation of the cylinder in the plane of the detector [rad] 42 // [DEFAULT]=cyl_phi=1.0 rad44 // [DEFAULT]=cyl_phi=1.0 [rad] 43 45 double cyl_phi; 44 46 45 47 } CylinderParameters; 46 48 -
sansmodels/src/sans/models/c_extensions/ellipsoid.h
r25a608f5 r70faf5d 9 9 //[PYTHONCLASS] = EllipsoidModel 10 10 //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi 11 //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg\n\ 12 // f(q)= 3*(scatter_sld- scatter_solvent)*V*[sin(q*r(Ra,Rb,alpha)) - q*r*cos(qr(Ra,Rb,alpha))] 13 // /[qr(Ra,Rb,alpha)]^(3)" 14 // r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2) + Ra^(2)*(cos(alpha))^(2)]^(1/2) 15 // scatter_sld: scattering length density of the scatter 16 // solvent_sld: scattering length density of the solvent 17 // V: volune of the Eliipsoid 18 // Ra: radius along the rotation axis of the Ellipsoid 19 // Rb: radius perpendicular to the rotation axis of the ellipsoid 20 // </text> 11 //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg 12 // f(q)= 3*(scatter_sld- scatter_solvent)*V 13 // *[sin(q*r(Ra,Rb,alpha))- q*r*cos(qr(Ra,Rb,alpha))] 14 // /[qr(Ra,Rb,alpha)]^(3)" 15 // r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2) 16 // + Ra^(2)*(cos(alpha))^(2)]^(1/2) 17 // scatter_sld: scattering length density of the scatter 18 // solvent_sld: scattering length density of the solvent 19 // V: volune of the Eliipsoid 20 // Ra: radius along the rotation axis of the Ellipsoid 21 // Rb: radius perpendicular to the rotation axis of the ellipsoid 22 // </text> 21 23 //[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width; 22 24 //radius_b.width; length.width; r_minor.width … … 30 32 double scale; 31 33 32 /// Rotation axis radius_a [ A]33 // [DEFAULT]=radius_a=20.0 A34 /// Rotation axis radius_a [Å] 35 // [DEFAULT]=radius_a=20.0 [Å] 34 36 double radius_a; 35 37 36 /// Radius_b [ A]37 // [DEFAULT]=radius_b=400 A38 /// Radius_b [Å] 39 // [DEFAULT]=radius_b=400 [Å] 38 40 double radius_b; 39 41 40 /// Contrast [ Å-2]41 // [DEFAULT]=contrast=3.0e-6 A-242 /// Contrast [1/Ų] 43 // [DEFAULT]=contrast=3.0e-6 [1/Ų] 42 44 double contrast; 43 45 44 /// Incoherent Background [ cm-1]45 // [DEFAULT]=background=0 cm-146 /// Incoherent Background [1/cm] 47 // [DEFAULT]=background=0 [1/cm] 46 48 double background; 47 49 48 50 /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad] 49 // [DEFAULT]=axis_theta=1.57 rad51 // [DEFAULT]=axis_theta=1.57 [rad] 50 52 double axis_theta; 51 53 /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad] 52 // [DEFAULT]=axis_phi=0.0 rad54 // [DEFAULT]=axis_phi=0.0 [rad] 53 55 double axis_phi; 54 56 } EllipsoidParameters; -
sansmodels/src/sans/models/c_extensions/elliptical_cylinder.h
r25a608f5 r70faf5d 5 5 * [PYTHONCLASS] = EllipticalCylinderModel 6 6 * [DISP_PARAMS] = r_minor, r_ratio, length, cyl_theta, cyl_phi, cyl_psi 7 * [DESCRIPTION] = ""7 * [DESCRIPTION] = Please see details... 8 8 * [FIXED]= <text> cyl_phi.width; 9 9 * cyl_theta.width; cyl_psi.width; length.width; r_minor.width; r_ratio.width </text> 10 * [ORIENTATION_PARAMS]= cyl_phi; cyl_theta; cyl_psi; cyl_phi.width; cyl_theta.width; cyl_psi.width 10 * [ORIENTATION_PARAMS]= cyl_phi; cyl_theta; cyl_psi; cyl_phi.width; cyl_theta.width; cyl_psi.width 11 11 * */ 12 12 … … 16 16 // [DEFAULT]=scale=1.0 17 17 double scale; 18 /// Minor radius [ A]19 // [DEFAULT]=r_minor=20.0 A18 /// Minor radius [Å] 19 // [DEFAULT]=r_minor=20.0 [Å] 20 20 double r_minor; 21 21 /// Ratio of major/minor radii 22 // [DEFAULT]=r_ratio=1.5 A22 // [DEFAULT]=r_ratio=1.5 23 23 double r_ratio; 24 /// Length of the cylinder [ A]25 // [DEFAULT]=length=400.0 A24 /// Length of the cylinder [Å] 25 // [DEFAULT]=length=400.0 [Å] 26 26 double length; 27 /// Contrast [ A-2]28 // [DEFAULT]=contrast=3.0e-6 A-227 /// Contrast [1/Ų] 28 // [DEFAULT]=contrast=3.0e-6 [1/Ų] 29 29 double contrast; 30 /// Incoherent Background (cm-1)0.00031 // [DEFAULT]=background=0 cm-130 /// Incoherent Background [1/cm] 0.000 31 // [DEFAULT]=background=0 [1/cm] 32 32 double background; 33 33 /// Orientation of the cylinder axis w/respect incoming beam [rad] 34 // [DEFAULT]=cyl_theta=1.57 rad34 // [DEFAULT]=cyl_theta=1.57 [rad] 35 35 double cyl_theta; 36 36 /// Orientation of the cylinder in the plane of the detector [rad] 37 // [DEFAULT]=cyl_phi=0.0 rad37 // [DEFAULT]=cyl_phi=0.0 [rad] 38 38 double cyl_phi; 39 39 /// Orientation of major radius of the cross-section w/respect vector q [rad] 40 // [DEFAULT]=cyl_psi=0.0 rad40 // [DEFAULT]=cyl_psi=0.0 [rad] 41 41 double cyl_psi; 42 42 } EllipticalCylinderParameters; -
sansmodels/src/sans/models/c_extensions/sphere.h
r25a608f5 r70faf5d 7 7 //[PYTHONCLASS] = SphereModel 8 8 //[DISP_PARAMS] = radius 9 //[DESCRIPTION] =<text>P(q)=(scale/V)*[3V(scatter_sld-solvent_sld)*(sin(qR)-qRcos(qR))/(qR)^3]^(2) 9 //[DESCRIPTION] =<text>P(q)=(scale/V) 10 // *[3V(scatter_sld-solvent_sld)*(sin(qR)-qRcos(qR))/(qR)^3]^(2) 10 11 // +bkg 11 12 // bkg: background level … … 17 18 //[FIXED]= radius.width 18 19 //[ORIENTATION_PARAMS]= <text> </text> 19 20 20 21 typedef struct { 21 22 /// Scale factor … … 23 24 double scale; 24 25 25 /// Radius of sphere [ A]26 // [DEFAULT]=radius=60.0 A26 /// Radius of sphere [Å] 27 // [DEFAULT]=radius=60.0 [Å] 27 28 double radius; 28 29 29 /// Contrast [ Å-2]30 // [DEFAULT]=contrast= 1.0e-6 A-230 /// Contrast [1/Ų] 31 // [DEFAULT]=contrast= 1.0e-6 [1/Ų] 31 32 double contrast; 32 33 33 /// Incoherent Background [ cm-1]34 // [DEFAULT]=background=0 cm-134 /// Incoherent Background [1/cm] 35 // [DEFAULT]=background=0 [1/cm] 35 36 double background; 36 37 } SphereParameters;
Note: See TracChangeset
for help on using the changeset viewer.