Changeset 43b7eea in sasmodels


Ignore:
Timestamp:
Mar 19, 2016 4:34:39 PM (9 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
26141cb
Parents:
81d3a0c
Message:

Initial clean-up of Bessel functions

Location:
sasmodels/models
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/bcc.py

    r2f0c07d r43b7eea  
    124124# pylint: enable=bad-whitespace, line-too-long 
    125125 
    126 source = ["lib/sph_j1c.c", "lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc.c"] 
     126source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc.c"] 
    127127 
    128128# parameters for demo 
  • sasmodels/models/core_shell_bicelle.c

    rcf85329 r43b7eea  
    5656    double sinarg2 = qq*(length+facthick)*cn; 
    5757 
    58     be1 = J1c(besarg1); 
    59     be2 = J1c(besarg2); 
     58    be1 = sas_J1c(besarg1); 
     59    be2 = sas_J1c(besarg2); 
    6060    si1 = sinc(sinarg1); 
    6161    si2 = sinc(sinarg2); 
  • sasmodels/models/core_shell_bicelle.py

    r2f0c07d r43b7eea  
    8787# pylint: enable=bad-whitespace, line-too-long 
    8888 
    89 source = ["lib/Si.c", "lib/J1.c", "lib/J1c.c", "lib/gauss76.c", "core_shell_bicelle.c"] 
     89source = ["lib/Si.c","lib/polevl.c", "lib/sas_J1.c", "lib/gauss76.c", "core_shell_bicelle.c"] 
    9090 
    9191demo = dict(scale=1, background=0, 
  • sasmodels/models/core_shell_cylinder.c

    rf4878dc r43b7eea  
    1111double _cyl(double twovd, double besarg, double siarg) 
    1212{ 
    13     const double bj = (besarg == 0.0 ? 0.5 : J1(besarg)/besarg); 
     13    const double bj = (besarg == 0.0 ? 0.5 : 0.5*sas_J1c(besarg)); 
    1414    const double si = (siarg == 0.0 ? 1.0 : sin(siarg)/siarg); 
    1515    return twovd*si*bj; 
  • sasmodels/models/core_shell_cylinder.py

    r01eece6 r43b7eea  
    130130             ] 
    131131 
    132 source = ["lib/J1.c", "lib/gauss76.c", "core_shell_cylinder.c"] 
     132source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "core_shell_cylinder.c"] 
    133133 
    134134def ER(radius, thickness, length): 
  • sasmodels/models/core_shell_parallelepiped.py

    raa2edb2 r43b7eea  
    141141             ] 
    142142 
    143 source = ["lib/J1.c", "lib/gauss76.c", "core_shell_parallelepiped.c"] 
     143source = ["lib/gauss76.c", "core_shell_parallelepiped.c"] 
    144144 
    145145 
  • sasmodels/models/ellipsoid.py

    raa2edb2 r43b7eea  
    132132             ] 
    133133 
    134 source = ["lib/J1.c", "lib/sph_j1c.c", "lib/gauss76.c", "ellipsoid.c"] 
     134source = ["lib/sph_j1c.c", "lib/gauss76.c", "ellipsoid.c"] 
    135135 
    136136def ER(rpolar, requatorial): 
  • sasmodels/models/elliptical_cylinder.c

    ra8b3cdb r43b7eea  
    2222        retval = 1.0; 
    2323    }else{ 
    24         retval = 2.0*NR_BessJ1(arg)/arg; 
     24        //retval = 2.0*NR_BessJ1(arg)/arg; 
     25        retval = sas_J1c(arg); 
    2526    } 
    2627    return retval*retval ; 
     
    155156      Be = 0.5; 
    156157    }else{ 
    157       Be = NR_BessJ1(qr)/qr; 
     158      //Be = NR_BessJ1(qr)/qr; 
     159      Be = 0.5*sas_J1c(qr); 
    158160    } 
    159161 
  • sasmodels/models/elliptical_cylinder.py

    raa2edb2 r43b7eea  
    105105# pylint: enable=bad-whitespace, line-too-long 
    106106 
    107 source = ["lib/nr_bess_j1.c", "lib/gauss76.c", "lib/gauss20.c", "elliptical_cylinder.c"] 
     107source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "lib/gauss20.c", "elliptical_cylinder.c"] 
    108108 
    109109demo = dict(scale=1, background=0, r_minor=100, r_ratio=1.5, length=400.0, 
  • sasmodels/models/fcc.py

    r2f0c07d r43b7eea  
    116116# pylint: enable=bad-whitespace, line-too-long 
    117117 
    118 source = ["lib/sph_j1c.c", "lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] 
     118source = ["lib/sph_j1c.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] 
    119119 
    120120# parameters for demo 
  • sasmodels/models/flexible_cylinder.c

    re7678b2 r43b7eea  
    2525    const double qr = q*radius; 
    2626    //const double crossSect = (2.0*J1(qr)/qr)*(2.0*J1(qr)/qr); 
    27     const double crossSect = J1c(qr); 
     27    const double crossSect = sas_J1c(qr); 
    2828    double flex = Sk_WR(q,length,kuhn_length); 
    2929    flex *= crossSect*crossSect; 
  • sasmodels/models/flexible_cylinder.py

    raa2edb2 r43b7eea  
    8484    ] 
    8585# pylint: enable=bad-whitespace, line-too-long 
    86 source = ["lib/J1.c", "lib/J1c.c", "lib/wrc_cyl.c", "flexible_cylinder.c"] 
     86source = ["lib/polevl.c","lib/sas_J1c.c", "lib/wrc_cyl.c", "flexible_cylinder.c"] 
    8787 
    8888demo = dict(scale=1.0, background=0.0001, 
  • sasmodels/models/flexible_cylinder_ex.c

    re7678b2 r43b7eea  
    2424        SINCOS(zi, sn, cn); 
    2525        double arg = q*sqrt(a*a*sn*sn+b*b*cn*cn); 
    26         double yyy = pow((double)J1c(arg),2); 
     26        double yyy = pow((double)sas_J1c(arg),2); 
    2727        yyy *= Gauss76Wt[i]; 
    2828        summ += yyy; 
  • sasmodels/models/flexible_cylinder_ex.py

    raa2edb2 r43b7eea  
    109109# pylint: enable=bad-whitespace, line-too-long 
    110110 
    111 source = ["lib/J1.c", "lib/J1c.c", "lib/gauss76.c", "lib/wrc_cyl.c", "flexible_cylinder_ex.c"] 
     111source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "lib/wrc_cyl.c", "flexible_cylinder_ex.c"] 
    112112 
    113113demo = dict(scale=1.0, background=0.0001, 
  • sasmodels/models/hollow_cylinder.c

    r0420af7 r43b7eea  
    2424        lam1 = 1.0; 
    2525    }else{ 
    26         lam1 = 2.0*J1(arg1)/arg1; 
     26        lam1 = sas_J1c(arg1); 
    2727    } 
    2828    if (arg2 == 0.0){ 
    2929        lam2 = 1.0; 
    3030    }else{ 
    31         lam2 = 2.0*J1(arg2)/arg2; 
     31        lam2 = sas_J1c(arg2); 
    3232    } 
    3333    //Todo: Need to check psi behavior as gamma goes to 1. 
  • sasmodels/models/hollow_cylinder.py

    r01eece6 r43b7eea  
    7979# pylint: enable=bad-whitespace, line-too-long 
    8080 
    81 source = ["lib/J1.c", "lib/gauss76.c", "hollow_cylinder.c"] 
     81source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "hollow_cylinder.c"] 
    8282 
    8383# pylint: disable=W0613 
  • sasmodels/models/hollow_rectangular_prism.py

    raa2edb2 r43b7eea  
    115115             ] 
    116116 
    117 source = ["lib/J1.c", "lib/gauss76.c", "hollow_rectangular_prism.c"] 
     117source = [ "lib/gauss76.c", "hollow_rectangular_prism.c"] 
    118118 
    119119def ER(a_side, b2a_ratio, c2a_ratio, thickness): 
  • sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py

    raa2edb2 r43b7eea  
    9999             ] 
    100100 
    101 source = ["lib/J1.c", "lib/gauss76.c", "hollow_rectangular_prism_infinitely_thin_walls.c"] 
     101source = ["lib/gauss76.c", "hollow_rectangular_prism_infinitely_thin_walls.c"] 
    102102 
    103103def ER(a_side, b2a_ratio, c2a_ratio): 
  • sasmodels/models/parallelepiped.py

    raa2edb2 r43b7eea  
    193193             ] 
    194194 
    195 source = ["lib/J1.c", "lib/gauss76.c", "parallelepiped.c"] 
     195source = ["lib/gauss76.c", "parallelepiped.c"] 
    196196 
    197197def ER(a_side, b_side, c_side): 
  • sasmodels/models/rectangular_prism.py

    raa2edb2 r43b7eea  
    107107             ] 
    108108 
    109 source = ["lib/J1.c", "lib/gauss76.c", "rectangular_prism.c"] 
     109source = ["lib/gauss76.c", "rectangular_prism.c"] 
    110110 
    111111def ER(a_side, b2a_ratio, c2a_ratio): 
  • sasmodels/models/stacked_disks.c

    rd507c3a r43b7eea  
    5252        const double sinarg2 = qq*(halfheight+layer_thick)*cos(zi); 
    5353 
    54     const double be1 = J1(besarg1)/besarg1; 
    55         const double be2 = J1(besarg2)/besarg2; 
     54    const double be1 = sas_J1c(besarg1); 
     55        const double be2 = sas_J1c(besarg2); 
    5656        const double si1 = sin(sinarg1)/sinarg1; 
    5757        const double si2 = sin(sinarg2)/sinarg2; 
     
    6262        const double totald=2.0*(layer_thick+halfheight); 
    6363 
    64         const double t1 = 2.0*area*(2.0*halfheight)*dr1*(si1)*(be1); 
    65         const double t2 = 2.0*area*dr2*(totald*si2-2.0*halfheight*si1)*(be2); 
     64        const double t1 = area*(2.0*halfheight)*dr1*(si1)*(be1); 
     65        const double t2 = area*dr2*(totald*si2-2.0*halfheight*si1)*(be2); 
    6666 
    6767 
  • sasmodels/models/stacked_disks.py

    r5111921 r43b7eea  
    133133# pylint: enable=bad-whitespace, line-too-long 
    134134 
    135 source = ["lib/gauss76.c", "lib/J1.c", "stacked_disks.c"] 
     135source = ["lib/polevl.c", "lib/sas_J1.c", "lib/gauss76.c", "stacked_disks.c"] 
    136136 
    137137demo = dict(background=0.001, 
  • sasmodels/models/triaxial_ellipsoid.py

    raa2edb2 r43b7eea  
    104104             ] 
    105105 
    106 source = ["lib/J1.c", "lib/sph_j1c.c", "lib/gauss76.c", "triaxial_ellipsoid.c"] 
     106source = ["lib/sph_j1c.c", "lib/gauss76.c", "triaxial_ellipsoid.c"] 
    107107 
    108108def ER(req_minor, req_major, rpolar): 
Note: See TracChangeset for help on using the changeset viewer.