Changeset d277229 in sasmodels for sasmodels/models/sphere.py


Ignore:
Timestamp:
Sep 7, 2018 5:29:38 AM (6 years ago)
Author:
grethevj
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3c60146
Parents:
2a12351b
Message:

Models updated to include choices for effective interaction radii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/sphere.py

    r71b751d rd277229  
    6767             ] 
    6868 
    69 source = ["lib/sas_3j1x_x.c"] 
     69source = ["lib/sas_3j1x_x.c","sphere.c"] 
    7070have_Fq = True 
     71effective_radius_type = ["radius"] 
    7172 
    72 c_code = """ 
    73 static double form_volume(double radius) 
    74 { 
    75     return M_4PI_3*cube(radius); 
    76 } 
    77  
    78 static void Fq(double q, double *f1, double *f2, double sld, double sld_solvent, double radius) 
    79 { 
    80     const double bes = sas_3j1x_x(q*radius); 
    81     const double contrast = (sld - sld_solvent); 
    82     const double form = contrast * form_volume(radius) * bes; 
    83     *f1 = 1.0e-2*form; 
    84     *f2 = 1.0e-4*form*form; 
    85 } 
    86 """ 
    87  
    88 def ER(radius): 
    89     """ 
    90     Return equivalent radius (ER) 
    91     """ 
    92     return radius 
     73#def ER(radius): 
     74#    """ 
     75#    Return equivalent radius (ER) 
     76#    """ 
     77#    return radius 
    9378 
    9479# VR defaults to 1.0 
Note: See TracChangeset for help on using the changeset viewer.