source: sasview/sansmodels/src/sans/models/c_extensions/ellipsoid.h @ 5eb9154

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 5eb9154 was c1c29b6, checked in by Jae Cho <jhjcho@…>, 15 years ago

some corrections and removed polydispersity from inside of function and set dQ =0

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[ae3ce4e]1#if !defined(ellipsoid_h)
2#define ellipsoid_h
3
[0f5bc9f]4/**
5 * Structure definition for ellipsoid parameters
[ae3ce4e]6 * The ellipsoid has axes radius_b, radius_b, radius_a.
7 * Ref: Jan Skov Pedersen, Advances in Colloid and Interface Science, 70 (1997) 171-210
8 */
9 //[PYTHONCLASS] = EllipsoidModel
[0f5bc9f]10 //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi
[1ed3834]11 //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(scatter_sld
12 //             - scatter_solvent)*V*[sin(q*r(Ra,Rb,alpha))
13 //             -q*r*cos(qr(Ra,Rb,alpha))]
[70faf5d]14 //             /[qr(Ra,Rb,alpha)]^(3)"
[1ed3834]15 //
[70faf5d]16 //     r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2)
17 //     + Ra^(2)*(cos(alpha))^(2)]^(1/2)
[1ed3834]18 //
19 //             scatter_sld: SLD of the scatter
20 //             solvent_sld: SLD of the solvent
21 //     contrast: SLD difference between scatter
22 //             and solvent
[70faf5d]23 //             V: volune of the Eliipsoid
[1ed3834]24 //             Ra: radius along the rotation axis
25 //             of the Ellipsoid
26 //             Rb: radius perpendicular to the
27 //             rotation axis of the ellipsoid
[70faf5d]28 //             </text>
[da3dae3]29 //[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width;
[c1c29b6]30 //radius_b.width; length.width; r_minor.width;
31 //r_ratio.width</text>
[25a608f5]32 //[ORIENTATION_PARAMS]=  axis_phi.width; axis_theta.width;axis_phi; axis_theta
33
34
[ae3ce4e]35typedef struct {
[0f5bc9f]36    /// Scale factor
[ae3ce4e]37    //  [DEFAULT]=scale=1.0
38    double scale;
[0f5bc9f]39
[1ed3834]40    /// Rotation axis radius_a [A]
41    //  [DEFAULT]=radius_a=20.0 [A]
[ae3ce4e]42    double radius_a;
[0f5bc9f]43
[1ed3834]44    /// Radius_b [A]
45    //  [DEFAULT]=radius_b=400 [A]
[ae3ce4e]46    double radius_b;
[0f5bc9f]47
[1ed3834]48    /// Contrast [1/A²]
49    //  [DEFAULT]=contrast=3.0e-6 [1/A²]
[ae3ce4e]50    double contrast;
[0f5bc9f]51
[70faf5d]52        /// Incoherent Background [1/cm]
53        //  [DEFAULT]=background=0 [1/cm]
[0f5bc9f]54        double background;
55
[ae3ce4e]56    /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad]
[70faf5d]57    //  [DEFAULT]=axis_theta=1.57 [rad]
[ae3ce4e]58    double axis_theta;
59    /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad]
[70faf5d]60    //  [DEFAULT]=axis_phi=0.0 [rad]
[0f5bc9f]61    double axis_phi;
[ae3ce4e]62} EllipsoidParameters;
63
64
65
66/// 1D scattering function
67double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q);
68
69/// 2D scattering function
70double ellipsoid_analytical_2D(EllipsoidParameters *pars, double q, double phi);
71double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy);
72double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y);
73
74#endif
Note: See TracBrowser for help on using the repository browser.