Ignore:
Timestamp:
Aug 16, 2009 10:30:27 AM (15 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7d11b81
Parents:
b0d0723
Message:

Changed the def. of lengths of sides for 2D,thus consistent w/ 1D. And shortened the names.

Location:
sansmodels/src/sans/models/c_extensions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/parallelepiped.c

    rd5bd424 r2cb89e7  
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
    24         dp[1] = pars->short_edgeA; 
    25         dp[2] = pars->longer_edgeB; 
    26         dp[3] = pars->longuest_edgeC; 
     24        dp[1] = pars->short_a; 
     25        dp[2] = pars->long_b; 
     26        dp[3] = pars->longer_c; 
    2727        dp[4] = pars->contrast; 
    2828        dp[5] = pars->background; 
     
    3838 
    3939    //handle arg=0 separately, as sin(t)/t -> 1 as t->0 
    40     argA = a*ala; 
    41     argB = b*alb; 
    42     argC = c*alc; 
     40    argA = a*ala/2; 
     41    argB = b*alb/2; 
     42    argC = c*alc/2; 
    4343    if(argA==0.0) { 
    4444                tmp1 = 1.0; 
     
    105105        double pi = 4.0*atan(1.0); 
    106106 
    107         edgeA = pars->short_edgeA; 
    108         edgeB = pars->longer_edgeB; 
    109         edgeC = pars->longuest_edgeC; 
     107        edgeA = pars->short_a; 
     108        edgeB = pars->long_b; 
     109        edgeC = pars->longer_c; 
    110110 
    111111 
     
    152152        //normalize by cylinder volume 
    153153        //NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vparallel 
    154     vol = 8*edgeA* edgeB * edgeC; 
     154    vol = edgeA* edgeB * edgeC; 
    155155        answer *= vol; 
    156156 
  • sansmodels/src/sans/models/c_extensions/parallelepiped.h

    r975ec8e r2cb89e7  
    77/** Structure definition for Parallelepiped parameters 
    88 * [PYTHONCLASS] = ParallelepipedModel 
    9  * [DISP_PARAMS] = short_edgeA, longer_edgeB, longuest_edgeC,parallel_phi,parallel_psi, parallel_theta 
    10    [DESCRIPTION] = <text> Calculates the form factor for a rectangular solid with uniform scattering length density. 
     9 * [DISP_PARAMS] = short_a, long_b, longer_c,parallel_phi,parallel_psi, parallel_theta 
     10   [DESCRIPTION] = <text> Form factor for a rectangular solid with uniform scattering length density. 
    1111 
    1212                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 
     13                short_a: length of short side of the parallelepiped [A] 
     14                long_b: length of long side of the parallelepiped [A] 
     15                longer_c: length of longer side of the parallelepiped [A] 
     16                contrast: particle_sld - solvent_sld 
    1717                background:Incoherent Background [1/cm] 
    1818                </text> 
    19         [FIXED]= <text>short_edgeA.width; longer_edgeB.width; longuest_edgeC.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text> 
     19        [FIXED]= <text>short_a.width; long_b.width; longer_c.width;parallel_phi.width;parallel_psi.width; parallel_theta.width</text> 
    2020        [ORIENTATION_PARAMS]= <text>parallel_phi;parallel_psi; parallel_theta; parallel_phi.width;parallel_psi.width; parallel_theta.width</text> 
    2121 
     
    2626    //  [DEFAULT]=scale=1.0 
    2727    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; 
     28    ///  Length of short side of the parallelepiped [A] 
     29    //  [DEFAULT]=short_a=35 [A] 
     30    double short_a; 
     31        /// Length of long side edge of the parallelepiped [A] 
     32    //  [DEFAULT]=long_b=75 [A] 
     33    double long_b; 
     34        /// Length of longer side of the parallelepiped [A] 
     35    //  [DEFAULT]=longer_c=400 [A] 
     36    double longer_c; 
    3737    /// Contrast [1/A²] 
    3838    //  [DEFAULT]=contrast=5.3e-6 [1/A²] 
Note: See TracChangeset for help on using the changeset viewer.