Changeset 487e695 in sasmodels for explore


Ignore:
Timestamp:
Jun 7, 2017 9:16:52 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
c1114bf
Parents:
5181ccc
Message:

add precision test functions for sticky hard sphere

File:
1 edited

Legend:

Unmodified
Added
Removed
  • explore/precision.py

    r5181ccc r487e695  
    269269    np_function=scipy.special.gamma, 
    270270    ocl_function=make_ocl("return sas_gamma(q);", "sas_gamma", ["lib/sas_gamma.c"]), 
    271     limits=(-3.1,10), 
     271    limits=(-3.1, 10), 
    272272) 
    273273add_function( 
     
    276276    np_function=scipy.special.erf, 
    277277    ocl_function=make_ocl("return sas_erf(q);", "sas_erf", ["lib/polevl.c", "lib/sas_erf.c"]), 
    278     limits=(-5.,5.), 
     278    limits=(-5., 5.), 
    279279) 
    280280add_function( 
     
    283283    np_function=scipy.special.erfc, 
    284284    ocl_function=make_ocl("return sas_erfc(q);", "sas_erfc", ["lib/polevl.c", "lib/sas_erf.c"]), 
    285     limits=(-5.,5.), 
     285    limits=(-5., 5.), 
    286286) 
    287287add_function( 
     
    297297    np_function=lambda x: 3*(np.sin(x)/x - np.cos(x))/(x*x), 
    298298    ocl_function=make_ocl("return sas_3j1x_x(q);", "sas_j1c", ["lib/sas_3j1x_x.c"]), 
     299) 
     300add_function( 
     301    name="(1-cos(x))/x^2", 
     302    mp_function=lambda x: (1 - mp.cos(x))/(x*x), 
     303    np_function=lambda x: (1 - np.cos(x))/(x*x), 
     304    ocl_function=make_ocl("return (1-cos(q))/q/q;", "sas_1mcosx_x2"), 
     305) 
     306add_function( 
     307    name="(1-sin(x)/x)/x", 
     308    mp_function=lambda x: 1/x - mp.sin(x)/(x*x), 
     309    np_function=lambda x: 1/x - np.sin(x)/(x*x), 
     310    ocl_function=make_ocl("return (1-sas_sinx_x(q))/q;", "sas_1msinx_x_x"), 
     311) 
     312add_function( 
     313    name="(1/2+(1-cos(x))/x^2-sin(x)/x)/x", 
     314    mp_function=lambda x: (0.5 - mp.sin(x)/x + (1-mp.cos(x))/(x*x))/x, 
     315    np_function=lambda x: (0.5 - np.sin(x)/x + (1-np.cos(x))/(x*x))/x, 
     316    ocl_function=make_ocl("return (0.5-sin(q)/q + (1-cos(q))/q/q)/q;", "sas_T2"), 
    299317) 
    300318add_function( 
Note: See TracChangeset for help on using the changeset viewer.