source: sasview/sansmodels/src/sans/models/c_extensions/csparallelepiped.h @ c572e5e

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 c572e5e 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: 3.3 KB
Line 
1/*
2        TODO: Add 2D model
3*/
4
5#if !defined(csparallelepiped_h)
6#define csparallelepiped_h
7/** Structure definition for CSParallelepiped parameters
8 * [PYTHONCLASS] = CSParallelepipedModel
9 * [DISP_PARAMS] = shortA, midB, longC,parallel_phi,parallel_psi, parallel_theta
10   [DESCRIPTION] = <text> Form factor for a rectangular Shell. Below are the Parameters.
11                scale: scale factor
12                shortA: length of short edge  [A]
13                midB: length of another short edge [A]
14                longC: length of long edge  of the parallelepiped [A]
15                rimA: length of short edge  [A]
16                rimB: length of another short edge [A]
17                rimC: length of long edge  of the parallelepiped [A]
18                sld_rimA: sld of rimA [1/A^(2)]
19                sld_rimB: sld of rimB [1/A^(2)]
20                sld_rimC: sld of rimC [1/A^(2)]
21                sld_core: Pipe_sld [1/A^(2)]
22                sld_solv: solvent_sld [1/A^(2)]
23                background: incoherent Background [1/cm]
24                </text>
25        [FIXED]= <text>shortA.width; midB.width; longC.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text>
26        [ORIENTATION_PARAMS]= <text>parallel_phi;parallel_psi; parallel_theta; parallel_phi.width;parallel_psi.width; parallel_theta.width</text>
27
28
29 **/
30typedef struct {
31    /// Scale factor
32    //  [DEFAULT]=scale=1.0
33    double scale;
34    ///  Length of short edge of the parallelepiped [A]
35    //  [DEFAULT]=shortA=35 [A]
36    double shortA;
37        /// Length of mid edge of the parallelepiped [A]
38    //  [DEFAULT]=midB=75 [A]
39    double midB;
40        /// Length of long edge of the parallelepiped [A]
41    //  [DEFAULT]=longC=400 [A]
42    double longC;
43    ///  Thickness of rimA [A]
44    //  [DEFAULT]=rimA=10 [A]
45    double rimA;
46        /// Thickness of rimB [A] [A]
47    //  [DEFAULT]=rimB=10 [A]
48    double rimB;
49        /// Thickness of rimC [A] [A]
50    //  [DEFAULT]=rimC=10 [A]
51    double rimC;
52    /// SLD_rimA [1/A^(2)]
53    //  [DEFAULT]=sld_rimA=2e-6 [1/A^(2)]
54    double sld_rimA;
55    /// SLD_rimB [1/A^(2)]
56    //  [DEFAULT]=sld_rimB=4e-6 [1/A^(2)]
57    double sld_rimB;
58    /// SLD_rimC [1/A^(2)]
59    //  [DEFAULT]=sld_rimC=2e-6 [1/A^(2)]
60    double sld_rimC;
61    /// SLD_pcore [1/A^(2)]
62    //  [DEFAULT]=sld_pcore=1e-6 [1/A^(2)]
63    double sld_pcore;
64    /// sld_solv [1/A^(2)]
65    //  [DEFAULT]=sld_solv=6e-6 [1/A^(2)]
66    double sld_solv;
67        /// Incoherent Background [1/cm]
68        //  [DEFAULT]=background=0.06 [1/cm]
69        double background;
70    /// Orientation of the parallelepiped axis w/respect incoming beam [deg]
71    //  [DEFAULT]=parallel_theta=0.0 [deg]
72    double parallel_theta;
73    /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg]
74    //  [DEFAULT]=parallel_phi=0.0 [deg]
75    double parallel_phi;
76    /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg]
77    //  [DEFAULT]=parallel_psi=0.0 [deg]
78    double parallel_psi;
79
80
81} CSParallelepipedParameters;
82
83
84
85/// 1D scattering function
86double csparallelepiped_analytical_1D(CSParallelepipedParameters *pars, double q);
87
88/// 2D scattering function
89double csparallelepiped_analytical_2D(CSParallelepipedParameters *pars, double q, double phi);
90double csparallelepiped_analytical_2DXY(CSParallelepipedParameters *pars, double qx, double qy);
91double csparallelepiped_analytical_2D_scaled(CSParallelepipedParameters *pars, double q, double q_x, double q_y);
92#endif
Note: See TracBrowser for help on using the repository browser.