Changeset b3f2a24 in sasmodels


Ignore:
Timestamp:
Oct 6, 2016 6:49:29 PM (8 years ago)
Author:
dirk
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
9272cbd, 0444c02
Parents:
adc753d
Message:

update help for Teubner-Stray model

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/teubner_strey.py

    rcaddb14 rb3f2a24  
    1919.. math:: 
    2020 
    21     a_2 &= \biggl[1+\bigl(\frac{2\pi\xi}{d}\bigr)^2\biggr]\\ 
     21    a_2 &= \biggl[1+\bigl(\frac{2\pi\xi}{d}\bigr)^2\biggr]^2\\ 
    2222    c_1 &= -2\xi^2\bigl(\frac{2\pi\xi}{d}\bigr)^2+2\xi^2\\ 
    2323    c_2 &= \xi^4 
     
    9292    """SAS form""" 
    9393    drho2 = (sld-sld_solvent)*(sld-sld_solvent) 
    94     a2 = power(1.0+power(2.0*pi*xi/d,2.0),2.0) 
    95     c1 = -2.0*xi*xi*power(2.0*pi*xi/d,2.0)+2*xi*xi 
     94    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 
    9697    c2 = power(xi,4.0) 
    9798    prefactor = 8.0*pi*volfraction*(1.0-volfraction)*drho2*c2/xi 
  • sasmodels/models/unified_power_Rg.py

    reb574d7 rb3f2a24  
    9595            exp_now = exp(-(q*rg[i])**2/3.) 
    9696            pow_now = (erf(q*rg[i]/sqrt(6.))**3/q)**power[i] 
    97             exp_next = exp(-(q*rg[i+1])**2/3.) if i < ilevel-1 else 1. 
     97            if i < ilevel-1: 
     98                exp_next = exp(-(q*rg[i+1])**2/3.) 
     99            else: 
     100                exp_next = 1 
    98101            result += G[i]*exp_now + B[i]*exp_next*pow_now 
     102 
    99103    result[q == 0] = np.sum(G[:ilevel]) 
    100104    return result 
Note: See TracChangeset for help on using the changeset viewer.