source: sasview/sansmodels/src/sans/models/c_extensions/parallelepiped.h @ 793c988

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

add 1d models

  • Property mode set to 100644
File size: 2.3 KB
Line 
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
9 * [DISP_PARAMS] = short_edgeA, longer_edgeB, longuest_edgeC,parallel_phi, parallel_theta
10   [DESCRIPTION] = <text> Calculates the form factor for a rectangular solid with uniform scattering length density.
11               
12                scale:Scale factor
13                short_edgeA: Shortest edge of the parallelepiped [A]
14                longer_edgeB: Longer edge of the parallelepiped [A]
15                longuest_edgeC: Longuest edge of the parallelepiped [A]
16                constrast: particle_sld - solvent_sld
17                background:Incoherent Background [1/cm]
18                </text>
19        [FIXED]= <text>short_edgeA.width; longer_edgeB.width; longuest_edgeC.width;parallel_phi.width; parallel_theta.width</text>
20        [ORIENTATION_PARAMS]= <text>parallel_phi; parallel_theta; parallel_phi.width; parallel_theta.width</text>
21
22
23 **/
24typedef struct {
25    /// Scale factor
26    //  [DEFAULT]=scale=1.0
27    double scale;
28    /// Shortest edge of the parallelepiped [A]
29    //  [DEFAULT]=short_edgeA=35 [A]
30    double short_edgeA;
31        /// Longer edge of the parallelepiped [A]
32    //  [DEFAULT]=longer_edgeB=75 [A]
33    double longer_edgeB;
34        /// Longuest edge of the parallelepiped [A]
35    //  [DEFAULT]=longuest_edgeC=400 [A]
36    double longuest_edgeC;
37    /// Contrast [1/A²]
38    //  [DEFAULT]=contrast=5.3e-6 [1/A²]
39    double contrast;
40        /// Incoherent Background [1/cm]
41        //  [DEFAULT]=background=0.0 [1/cm]
42        double background;
43    /// Orientation of the parallelepiped axis w/respect incoming beam [rad]
44    //  [DEFAULT]=parallel_theta=1.0 [rad]
45    double parallel_theta;
46    /// Orientation of the parallelepiped in the plane of the detector [rad]
47    //  [DEFAULT]=parallel_phi=1.0 [rad]
48    double parallel_phi;
49
50
51} ParallelepipedParameters;
52
53
54
55/// 1D scattering function
56double parallelepiped_analytical_1D(ParallelepipedParameters *pars, double q);
57
58/// 2D scattering function
59double parallelepiped_analytical_2D(ParallelepipedParameters *pars, double q, double phi);
60double parallelepiped_analytical_2DXY(ParallelepipedParameters *pars, double qx, double qy);
61double parallelepiped_analytical_2D_scaled(ParallelepipedParameters *pars, double q, double q_x, double q_y);
62
63#endif
Note: See TracBrowser for help on using the repository browser.