source: sasview/sansmodels/src/sans/models/c_extensions/ellipsoid.h @ 836fe6e

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 836fe6e was 836fe6e, checked in by Gervaise Alina <gervyh@…>, 15 years ago

c_model wrappergenerator modified…
self.fixed list added to model

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#if !defined(ellipsoid_h)
2#define ellipsoid_h
3
4/**
5 * Structure definition for ellipsoid parameters
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
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>
21 //[FIXED]= <text> axis_phi.width; axis_theta;radius_a.width;
22 //radius_b.width; length.width; r_minor.width, r_ratio.width</text>
23typedef struct {
24    /// Scale factor
25    //  [DEFAULT]=scale=1.0
26    double scale;
27
28    /// Rotation axis radius_a [A]
29    //  [DEFAULT]=radius_a=20.0 A
30    double radius_a;
31
32    /// Radius_b [A]
33    //  [DEFAULT]=radius_b=400 A
34    double radius_b;
35
36    /// Contrast [Å-2]
37    //  [DEFAULT]=contrast=3.0e-6 A-2
38    double contrast;
39
40        /// Incoherent Background [cm-1]
41        //  [DEFAULT]=background=0 cm-1
42        double background;
43
44    /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad]
45    //  [DEFAULT]=axis_theta=1.57 rad
46    double axis_theta;
47    /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad]
48    //  [DEFAULT]=axis_phi=0.0 rad
49    double axis_phi;
50} EllipsoidParameters;
51
52
53
54/// 1D scattering function
55double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q);
56
57/// 2D scattering function
58double ellipsoid_analytical_2D(EllipsoidParameters *pars, double q, double phi);
59double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy);
60double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y);
61
62#endif
Note: See TracBrowser for help on using the repository browser.