Changeset 58c3367 in sasmodels


Ignore:
Timestamp:
Sep 26, 2016 3:01:05 PM (8 years ago)
Author:
ajj
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:
639042e
Parents:
52ec91e
Message:

Fixing volume normalisation and docs on pringle model.

Closes #604

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/pringle.c

    rc047acf r58c3367  
    4242    } 
    4343 
    44     #if 1 
    45     // TODO: should the normalization be to R^2 or the last value, r^2 
    46     // the gaussian window does not go all the way from 0 to 1. 
    47     //radius = Gauss76Z[75] * zm + zb; 
    48     *Sn = zm*sumS / (r*r); 
    49     *Cn = zm*sumC / (r*r); 
    50     #else 
    5144    *Sn = zm*sumS / (radius*radius); 
    5245    *Cn = zm*sumC / (radius*radius); 
    53     #endif 
    5446} 
    5547 
     
    109101double form_volume(double radius, double thickness, double alpha, double beta) 
    110102{ 
    111     // TODO: Normalize by form volume 
    112     //return M_PI*radius*radius*thickness; 
    113     return 1.0; 
     103    return M_PI*radius*radius*thickness; 
    114104} 
    115105 
     
    126116    double contrast = sld_pringle - sld_solvent; 
    127117    double volume = M_PI*radius*radius*thickness; 
    128     // TODO: If normalize by form volume, need an extra volume here 
    129     //return 1.0e-4*form * square(contrast * volume); 
    130     return 1.0e-4*form * square(contrast) * volume; 
     118    return 1.0e-4*form * square(contrast * volume); 
    131119} 
  • sasmodels/models/pringle.py

    r40a87fa r58c3367  
    1717.. math:: 
    1818 
    19     C_n = \int^{R}_{0} r dr\cos(qr^2\alpha \cos{\psi}) 
     19    C_n = \frac{1}{r^2}\int^{R}_{0} r dr\cos(qr^2\alpha \cos{\psi}) 
    2020    J_n\left( qr^2\beta \cos{\psi}\right) 
    2121    J_{2n}\left( qr \sin{\psi}\right) 
     
    2323.. math:: 
    2424 
    25     S_n = \int^{R}_{0} r dr\sin(qr^2\alpha \cos{\psi}) 
     25    S_n = \frac{1}{r^2}\int^{R}_{0} r dr\sin(qr^2\alpha \cos{\psi}) 
    2626    J_n\left( qr^2\beta \cos{\psi}\right) 
    2727    J_{2n}\left( qr \sin{\psi}\right) 
     
    4747**Last Modified by:** Wojciech Wpotrzebowski **on:** March 20, 2016 
    4848 
    49 **Last Reviewed by:** Paul Butler **on:** March 21, 2016 
     49**Last Reviewed by:** Andrew Jackson **on:** September 26, 2016 
    5050 
    5151""" 
Note: See TracChangeset for help on using the changeset viewer.