Changeset 4962519 in sasmodels for sasmodels/models/teubner_strey.py


Ignore:
Timestamp:
Oct 14, 2016 6:49:58 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:
14838a3
Parents:
a5b6997
Message:

use square and cube instead of pow()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/teubner_strey.py

    rb3f2a24 r4962519  
    7171 
    7272import numpy as np 
    73 from numpy import inf,power,pi 
     73from numpy import inf, pi 
    7474 
    7575name = "teubner_strey" 
     
    9393    drho2 = (sld-sld_solvent)*(sld-sld_solvent) 
    9494    k = 2.0*pi*xi/d 
    95     a2 = power(1.0+power(k,2.0),2.0) 
    96     c1 = -2.0*xi*xi*power(k,2.0)+2*xi*xi 
    97     c2 = power(xi,4.0) 
     95    a2 = (1.0 + k**2)**2 
     96    c1 = 2.0*xi**2 * (1.0 - k**2) 
     97    c2 = xi**4 
    9898    prefactor = 8.0*pi*volfraction*(1.0-volfraction)*drho2*c2/xi 
    9999    #k2 = (2.0*pi/d)*(2.0*pi/d) 
Note: See TracChangeset for help on using the changeset viewer.