Changeset 924a119 in sasmodels for sasmodels/models


Ignore:
Timestamp:
Jan 16, 2018 6:34:23 PM (6 years ago)
Author:
GitHub <noreply@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
0014c77
Parents:
c1bccff (diff), 8fb2a94 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (01/16/18 18:34:23)
git-committer:
GitHub <noreply@…> (01/16/18 18:34:23)
Message:

Merge pull request #57 from SasView?/ticket-1043

use Iqac/Iqabc? for the new orientation interface but Iqxy for the old. Fixes #1043

Location:
sasmodels/models
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/_spherepy.py

    ref07e95 r108e70e  
    8888Iq.vectorized = True  # Iq accepts an array of q values 
    8989 
    90 def Iqxy(qx, qy, sld, sld_solvent, radius): 
    91     return Iq(sqrt(qx ** 2 + qy ** 2), sld, sld_solvent, radius) 
    92 Iqxy.vectorized = True  # Iqxy accepts arrays of qx, qy values 
    93  
    9490def sesans(z, sld, sld_solvent, radius): 
    9591    """ 
  • sasmodels/models/barbell.c

    r74768cb r108e70e  
    9090 
    9191static double 
    92 Iqxy(double qab, double qc, 
     92Iqac(double qab, double qc, 
    9393    double sld, double solvent_sld, 
    9494    double radius_bell, double radius, double length) 
  • sasmodels/models/bcc_paracrystal.c

    r74768cb r108e70e  
    107107 
    108108 
    109 static double Iqxy(double qa, double qb, double qc, 
     109static double Iqabc(double qa, double qb, double qc, 
    110110    double dnn, double d_factor, double radius, 
    111111    double sld, double solvent_sld) 
  • sasmodels/models/capped_cylinder.c

    r74768cb r108e70e  
    115115 
    116116static double 
    117 Iqxy(double qab, double qc, 
     117Iqac(double qab, double qc, 
    118118    double sld, double solvent_sld, double radius, 
    119119    double radius_cap, double length) 
  • sasmodels/models/core_shell_bicelle.c

    r74768cb r108e70e  
    6767 
    6868static double 
    69 Iqxy(double qab, double qc, 
     69Iqac(double qab, double qc, 
    7070    double radius, 
    7171    double thick_rim, 
  • sasmodels/models/core_shell_bicelle_elliptical.c

    rd4db147 r108e70e  
    7171 
    7272static double 
    73 Iqxy(double qa, double qb, double qc, 
     73Iqabc(double qa, double qb, double qc, 
    7474    double r_minor, 
    7575    double x_core, 
  • sasmodels/models/core_shell_bicelle_elliptical_belt_rough.c

    rd4db147 r108e70e  
    7979 
    8080static double 
    81 Iqxy(double qa, double qb, double qc, 
     81Iqabc(double qa, double qb, double qc, 
    8282          double r_minor, 
    8383          double x_core, 
     
    114114    return 1.0e-4 * Aq*exp(-0.5*(square(qa) + square(qb) + square(qc) )*square(sigma)); 
    115115} 
    116  
  • sasmodels/models/core_shell_bicelle_elliptical_belt_rough.py

    r110f69c r108e70e  
    149149    ["sld_rim",        "1e-6/Ang^2", 1, [-inf, inf], "sld",         "Cylinder rim scattering length density"], 
    150150    ["sld_solvent",    "1e-6/Ang^2", 6, [-inf, inf], "sld",         "Solvent scattering length density"], 
     151    ["sigma",       "Ang",        0,    [0, inf],    "",            "interfacial roughness"], 
    151152    ["theta",       "degrees",    90.0, [-360, 360], "orientation", "cylinder axis to beam angle"], 
    152153    ["phi",         "degrees",    0,    [-360, 360], "orientation", "rotation about beam"], 
    153154    ["psi",         "degrees",    0,    [-360, 360], "orientation", "rotation about cylinder axis"], 
    154     ["sigma",       "Ang",        0,    [0, inf],    "",            "interfacial roughness"] 
    155155    ] 
    156156 
  • sasmodels/models/core_shell_cylinder.c

    r74768cb r108e70e  
    4848 
    4949 
    50 double Iqxy(double qab, double qc, 
     50double Iqac(double qab, double qc, 
    5151    double core_sld, 
    5252    double shell_sld, 
  • sasmodels/models/core_shell_ellipsoid.c

    r74768cb r108e70e  
    7575 
    7676static double 
    77 Iqxy(double qab, double qc, 
     77Iqac(double qab, double qc, 
    7878    double radius_equat_core, 
    7979    double x_core, 
  • sasmodels/models/core_shell_parallelepiped.c

    ra261a83 re077231  
    4343    // Code converted from functions CSPPKernel and CSParallelepiped in libCylinder.c 
    4444    // Did not understand the code completely, it should be rechecked (Miguel Gonzalez) 
    45     // Code is rewritten,the code is compliant with Diva Singhs thesis now (Dirk Honecker) 
    46     // Code rewritten (PAK) 
     45    // Code is rewritten, the code is compliant with Diva Singh's thesis now (Dirk Honecker) 
     46    // Code rewritten; cross checked against hollow rectangular prism and realspace (PAK) 
    4747 
    4848    const double half_q = 0.5*q; 
     
    102102 
    103103static double 
    104 Iqxy(double qa, double qb, double qc, 
     104Iqabc(double qa, double qb, double qc, 
    105105    double core_sld, 
    106106    double arim_sld, 
     
    121121    const double drC = crim_sld-solvent_sld; 
    122122 
    123     // The definitions of ta, tb, tc are not the same as in the 1D case because there is no 
    124     // the scaling by B. 
    125123    const double tA = length_a + 2.0*thick_rim_a; 
    126124    const double tB = length_b + 2.0*thick_rim_b; 
  • sasmodels/models/core_shell_parallelepiped.py

    r10ee838 r97be877  
    136136* **Author:** NIST IGOR/DANSE **Date:** pre 2010 
    137137* **Converted to sasmodels by:** Miguel Gonzales **Date:** February 26, 2016 
    138 * **Last Modified by:** Wojciech Potrzebowski **Date:** January 11, 2017 
    139 * **Currently Under review by:** Paul Butler 
     138* **Last Modified by:** Paul Kienzle **Date:** October 17, 2017 
     139* Cross-checked against hollow rectangular prism and rectangular prism for 
     140  equal thickness overlapping sides, and by Monte Carlo sampling of points 
     141  within the shape for non-uniform, non-overlapping sides. 
    140142""" 
    141143 
  • sasmodels/models/cylinder.c

    r74768cb r108e70e  
    4545 
    4646static double 
    47 Iqxy(double qab, double qc, 
     47Iqac(double qab, double qc, 
    4848    double sld, 
    4949    double solvent_sld, 
  • sasmodels/models/ellipsoid.c

    r74768cb r108e70e  
    3939 
    4040static double 
    41 Iqxy(double qab, double qc, 
     41Iqac(double qab, double qc, 
    4242    double sld, 
    4343    double sld_solvent, 
  • sasmodels/models/elliptical_cylinder.c

    rd4db147 r108e70e  
    5454 
    5555static double 
    56 Iqxy(double qa, double qb, double qc, 
     56Iqabc(double qa, double qb, double qc, 
    5757     double radius_minor, double r_ratio, double length, 
    5858     double sld, double solvent_sld) 
  • sasmodels/models/fcc_paracrystal.c

    r74768cb r108e70e  
    8080 
    8181 
    82 static double Iqxy(double qa, double qb, double qc, 
     82static double Iqabc(double qa, double qb, double qc, 
    8383    double dnn, double d_factor, double radius, 
    8484    double sld, double solvent_sld) 
  • sasmodels/models/hollow_cylinder.c

    r74768cb r108e70e  
    5252 
    5353static double 
    54 Iqxy(double qab, double qc, 
     54Iqac(double qab, double qc, 
    5555    double radius, double thickness, double length, 
    5656    double sld, double solvent_sld) 
  • sasmodels/models/hollow_rectangular_prism.c

    r74768cb r108e70e  
    8585} 
    8686 
    87 double Iqxy(double qa, double qb, double qc, 
     87double Iqabc(double qa, double qb, double qc, 
    8888    double sld, 
    8989    double solvent_sld, 
  • sasmodels/models/line.py

    r2d81cfe r108e70e  
    5757Iq.vectorized = True # Iq accepts an array of q values 
    5858 
     59 
    5960def Iqxy(qx, qy, *args): 
    6061    """ 
     
    6970 
    7071Iqxy.vectorized = True  # Iqxy accepts an array of qx qy values 
     72 
     73# uncomment the following to test Iqxy in C models 
     74#del Iq, Iqxy 
     75#c_code = """ 
     76#static double Iq(double q, double b, double m) { return m*q+b; } 
     77#static double Iqxy(double qx, double qy, double b, double m) 
     78#{ return (m*qx+b)*(m*qy+b); } 
     79#""" 
    7180 
    7281def random(): 
  • sasmodels/models/parallelepiped.c

    r74768cb r108e70e  
    5353 
    5454static double 
    55 Iqxy(double qa, double qb, double qc, 
     55Iqabc(double qa, double qb, double qc, 
    5656    double sld, 
    5757    double solvent_sld, 
  • sasmodels/models/rectangular_prism.c

    r74768cb r108e70e  
    7171 
    7272 
    73 double Iqxy(double qa, double qb, double qc, 
     73double Iqabc(double qa, double qb, double qc, 
    7474    double sld, 
    7575    double solvent_sld, 
  • sasmodels/models/sc_paracrystal.c

    r74768cb r108e70e  
    8282 
    8383static double 
    84 Iqxy(double qa, double qb, double qc, 
     84Iqabc(double qa, double qb, double qc, 
    8585    double dnn, double d_factor, double radius, 
    8686    double sld, double solvent_sld) 
  • sasmodels/models/stacked_disks.c

    r74768cb r108e70e  
    142142 
    143143static double 
    144 Iqxy(double qab, double qc, 
     144Iqac(double qab, double qc, 
    145145    double thick_core, 
    146146    double thick_layer, 
  • sasmodels/models/triaxial_ellipsoid.c

    r74768cb r108e70e  
    4646 
    4747static double 
    48 Iqxy(double qa, double qb, double qc, 
     48Iqabc(double qa, double qb, double qc, 
    4949    double sld, 
    5050    double sld_solvent, 
  • sasmodels/models/lib/gauss150.c

    r74768cb r99b84ec  
    1 /* 
    2  *  GaussWeights.c 
    3  *  SANSAnalysis 
    4  * 
    5  *  Created by Andrew Jackson on 4/23/07. 
    6  *  Copyright 2007 __MyCompanyName__. All rights reserved. 
    7  * 
    8  */ 
     1// Created by Andrew Jackson on 4/23/07 
     2 
    93 #ifdef GAUSS_N 
    104 # undef GAUSS_N 
     
    1610 #define GAUSS_W Gauss150Wt 
    1711 
    18 // Note: using array size 152 so that it is a multiple of 4 
    1912 
    20 // Gaussians 
     13// Note: using array size 152 rather than 150 so that it is a multiple of 4. 
     14// Some OpenCL devices prefer that vectors start and end on nice boundaries. 
    2115constant double Gauss150Z[152]={ 
    2216        -0.9998723404457334, 
     
    170164        0.9993274305065947, 
    171165        0.9998723404457334, 
    172         0., 
    173         0. 
     166        0., // zero padding is ignored 
     167        0.  // zero padding is ignored 
    174168}; 
    175169 
     
    325319        0.0007624720924706, 
    326320        0.0003276086705538, 
    327         0., 
    328         0. 
     321        0., // zero padding is ignored 
     322        0.  // zero padding is ignored 
    329323}; 
  • sasmodels/models/lib/gauss20.c

    r74768cb r99b84ec  
    1 /* 
    2  *  GaussWeights.c 
    3  *  SANSAnalysis 
    4  * 
    5  *  Created by Andrew Jackson on 4/23/07. 
    6  *  Copyright 2007 __MyCompanyName__. All rights reserved. 
    7  * 
    8  */ 
     1// Created by Andrew Jackson on 4/23/07 
     2 
    93 #ifdef GAUSS_N 
    104 # undef GAUSS_N 
  • sasmodels/models/lib/gauss76.c

    r74768cb r99b84ec  
    1 /* 
    2  *  GaussWeights.c 
    3  *  SANSAnalysis 
    4  * 
    5  *  Created by Andrew Jackson on 4/23/07. 
    6  *  Copyright 2007 __MyCompanyName__. All rights reserved. 
    7  * 
    8  */ 
     1// Created by Andrew Jackson on 4/23/07 
     2 
    93 #ifdef GAUSS_N 
    104 # undef GAUSS_N 
Note: See TracChangeset for help on using the changeset viewer.