Changeset 8393c74 in sasmodels


Ignore:
Timestamp:
Oct 17, 2016 1:24:43 PM (8 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:
9762341
Parents:
1b49bf8
Message:

teubner-strey: code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/teubner_strey.py

    r4962519 r8393c74  
    6969B Jakobs, T Sottmann, R Strey, and I Grillo, *J. Chem. Phys.*, 115 (2001), 580 
    7070""" 
     71from __future__ import division 
    7172 
    7273import numpy as np 
     
    8990    ] 
    9091 
    91 def Iq(q, volfraction, sld, sld_solvent,d,xi): 
     92def Iq(q, volfraction_a, sld_a, sld_b, d, xi): 
    9293    """SAS form""" 
    93     drho2 = (sld-sld_solvent)*(sld-sld_solvent) 
     94    drho = sld_a - sld_b 
    9495    k = 2.0*pi*xi/d 
    9596    a2 = (1.0 + k**2)**2 
    9697    c1 = 2.0*xi**2 * (1.0 - k**2) 
    9798    c2 = xi**4 
    98     prefactor = 8.0*pi*volfraction*(1.0-volfraction)*drho2*c2/xi 
    99     #k2 = (2.0*pi/d)*(2.0*pi/d) 
    100     #xi2 = 1/(xi*xi) 
    101     #q2 = q*q 
    102     #result = prefactor/((xi2+k2)*(xi2+k2)+2.0*(xi2-k2)*q2+q2*q2) 
     99    prefactor = 8.0*pi * volfraction_a*(1.0 - volfraction_a) * drho**2 * c2/xi 
    103100    return 1.0e-4*prefactor / np.polyval([c2, c1, a2], q**2) 
    104101 
Note: See TracChangeset for help on using the changeset viewer.