source: sasview/sansmodels/src/sans/models/c_extensions/barbell.h @ 34c2649

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 34c2649 was 4628e31, checked in by Jae Cho <jhjcho@…>, 14 years ago

changed the unit of angles into degrees

  • Property mode set to 100644
File size: 2.4 KB
Line 
1#if !defined(barbell_h)
2#define barbell_h
3
4/**
5 * Structure definition for BarBell parameters
6 */
7 //[PYTHONCLASS] = BarBellModel
8 //[DISP_PARAMS] = rad_bar,len_bar,rad_bell,phi,  theta
9 //[DESCRIPTION] =<text>Calculates the scattering from a barbell-shaped cylinder. That is
10 //                             a sphereocylinder with spherical end caps
11 //                             that have a radius larger than that of
12 //                             the cylinder and the center of the end cap
13 //                             radius lies outside of the cylinder.
14 //                             Note: As the length of cylinder(bar) -->0,
15 //                             it becomes a dumbbell.
16 //                             And when rad_bar = rad_bell,
17 //                             it is a spherocylinder.
18 //                             It must be that rad_bar <(=) rad_bell.
19 //                             [Parameters];
20 //                             scale: volume fraction of spheres,
21 //                             background:incoherent background,
22 //                             rad_bar: radius of the cylindrical bar,
23 //                             len_bar: length of the cylindrical bar,
24 //                             rad_bell: radius of the spherical bell,
25 //                             sld_barbell: SLD of the barbell,
26 //                             sld_solv: SLD of the solvent.
27 //             </text>
28 //[FIXED]=  rad_bar.width;len_bar;rad_bell;phi.width; theta.width
29 //[ORIENTATION_PARAMS]= <text> phi; theta; phi.width; theta.width</text>
30
31typedef struct {
32    /// Scale factor
33    //  [DEFAULT]=scale= 1.0
34    double scale;
35
36    /// rad_bar [A]
37    //  [DEFAULT]=rad_bar=20.0 [A]
38    double rad_bar;
39
40    /// length of the bar [A]
41    //  [DEFAULT]=len_bar=400.0 [A]
42    double len_bar;
43
44    /// Radius of sphere [A]
45    //  [DEFAULT]=rad_bell=40.0 [A]
46    double rad_bell;
47
48    /// sld_barbell [1/A^(2)]
49    //  [DEFAULT]=sld_barbell= 1.0e-6 [1/A^(2)]
50    double sld_barbell;
51
52    /// sld_solv [1/A^(2)]
53    //  [DEFAULT]=sld_solv= 6.3e-6 [1/A^(2)]
54    double sld_solv;
55
56        /// Incoherent Background [1/cm]
57        //  [DEFAULT]=background=0.0 [1/cm]
58        double background;
59
60    /// Angle of the main axis against z-axis in detector plane [deg]
61    //  [DEFAULT]=theta=0.0 [deg]
62    double theta;
63    /// Azimuthal angle around z-axis in detector plane [deg]
64    //  [DEFAULT]=phi=0.0 [deg]
65    double phi;
66
67} BarBellParameters;
68
69
70
71/// 1D scattering function
72double barbell_analytical_1D(BarBellParameters *pars, double q);
73
74/// 2D scattering function
75double barbell_analytical_2D(BarBellParameters *pars, double q, double phi);
76double barbell_analytical_2DXY(BarBellParameters *pars, double qx, double qy);
77double barbell_analytical_2D_scaled(BarBellParameters *pars, double q, double q_x, double q_y);
78
79#endif
Note: See TracBrowser for help on using the repository browser.