source: sasview/sansmodels/src/c_extensions/parallelepiped.h @ 31af069

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 31af069 was 67424cd, checked in by Mathieu Doucet <doucetm@…>, 13 years ago

Reorganizing models in preparation of cpp cleanup

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[8a48713]1/*
2        TODO: Add 2D model
3*/
4
5#if !defined(parallelepiped_h)
6#define parallelepiped_h
7/** Structure definition for Parallelepiped parameters
8 * [PYTHONCLASS] = ParallelepipedModel
[8e36cdd]9 * [DISP_PARAMS] = short_a, short_b, long_c,parallel_phi,parallel_psi, parallel_theta
[2cb89e7]10   [DESCRIPTION] = <text> Form factor for a rectangular solid with uniform scattering length density.
[975ec8e]11
[8a48713]12                scale:Scale factor
[8e36cdd]13                short_a: length of short edge  [A]
14                short_b: length of another short edge [A]
15                long_c: length of long edge  of the parallelepiped [A]
[f10063e]16                sldPipe: Pipe_sld
17                sldSolv: solvent_sld
[975ec8e]18                background:Incoherent Background [1/cm]
[8a48713]19                </text>
[8e36cdd]20        [FIXED]= <text>short_a.width; short_b.width; long_c.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text>
[975ec8e]21        [ORIENTATION_PARAMS]= <text>parallel_phi;parallel_psi; parallel_theta; parallel_phi.width;parallel_psi.width; parallel_theta.width</text>
[8a48713]22
23
24 **/
25typedef struct {
26    /// Scale factor
27    //  [DEFAULT]=scale=1.0
28    double scale;
[8e36cdd]29    ///  Length of short edge of the parallelepiped [A]
[2cb89e7]30    //  [DEFAULT]=short_a=35 [A]
31    double short_a;
[8e36cdd]32        /// Length of short edge edge of the parallelepiped [A]
33    //  [DEFAULT]=short_b=75 [A]
34    double short_b;
35        /// Length of long edge of the parallelepiped [A]
36    //  [DEFAULT]=long_c=400 [A]
37    double long_c;
[f10063e]38    /// SLD_Pipe [1/A^(2)]
39    //  [DEFAULT]=sldPipe=6.3e-6 [1/A^(2)]
40    double sldPipe;
41    /// sldSolv [1/A^(2)]
42    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)]
43    double sldSolv;
[975ec8e]44        /// Incoherent Background [1/cm]
[8a48713]45        //  [DEFAULT]=background=0.0 [1/cm]
46        double background;
[4628e31]47    /// Orientation of the parallelepiped axis w/respect incoming beam [deg]
48    //  [DEFAULT]=parallel_theta=0.0 [deg]
[8a48713]49    double parallel_theta;
[4628e31]50    /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg]
51    //  [DEFAULT]=parallel_phi=0.0 [deg]
[8a48713]52    double parallel_phi;
[4628e31]53    /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg]
54    //  [DEFAULT]=parallel_psi=0.0 [deg]
[975ec8e]55    double parallel_psi;
[8a48713]56
57
58} ParallelepipedParameters;
59
60
61
62/// 1D scattering function
63double parallelepiped_analytical_1D(ParallelepipedParameters *pars, double q);
64
65/// 2D scattering function
66double parallelepiped_analytical_2D(ParallelepipedParameters *pars, double q, double phi);
67double parallelepiped_analytical_2DXY(ParallelepipedParameters *pars, double qx, double qy);
68double parallelepiped_analytical_2D_scaled(ParallelepipedParameters *pars, double q, double q_x, double q_y);
69#endif
Note: See TracBrowser for help on using the repository browser.