Changeset b297ba9 in sasmodels for sasmodels/models/rectangular_prism.py


Ignore:
Timestamp:
Mar 20, 2019 7:03:50 PM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
4e28511
Parents:
0d362b7
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/rectangular_prism.py

    r99658f6 rb297ba9  
    3232.. math:: 
    3333 
    34   A_P\,(q) = 
     34    A_P\,(q) = 
    3535      \frac{\sin \left( \tfrac{1}{2}qC \cos\theta \right) }{\tfrac{1}{2} qC \cos\theta} 
    3636      \,\times\, 
     
    4848 
    4949.. math:: 
    50   P(q) =  \frac{2}{\pi} \int_0^{\frac{\pi}{2}} \, 
    51   \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi 
     50    P(q) =  \frac{2}{\pi} \int_0^{\frac{\pi}{2}} \, 
     51    \int_0^{\frac{\pi}{2}} A_P^2(q) \, \sin\theta \, d\theta \, d\phi 
    5252 
    5353And the 1D scattering intensity is calculated as 
    5454 
    5555.. math:: 
    56   I(q) = \text{scale} \times V \times (\rho_\text{p} - 
    57   \rho_\text{solvent})^2 \times P(q) 
     56    I(q) = \text{scale} \times V \times (\rho_\text{p} - 
     57    \rho_\text{solvent})^2 \times P(q) 
    5858 
    5959where $V$ is the volume of the rectangular prism, $\rho_\text{p}$ 
     
    100100R Nayuk and K Huber, *Z. Phys. Chem.*, 226 (2012) 837-854 
    101101 
    102 L. Onsager, Ann. New York Acad. Sci. 51, 627-659 (1949).  
     102L. Onsager, Ann. New York Acad. Sci. 51, 627-659 (1949). 
    103103 
    104104""" 
    105105 
    106106import numpy as np 
    107 from numpy import pi, inf, sqrt 
     107from numpy import inf 
    108108 
    109109name = "rectangular_prism" 
     
    140140have_Fq = True 
    141141effective_radius_type = [ 
    142     "equivalent cylinder excluded volume", "equivalent volume sphere",  
     142    "equivalent cylinder excluded volume", "equivalent volume sphere", 
    143143    "half length_a", "half length_b", "half length_c", 
    144144    "equivalent circular cross-section", "half ab diagonal", "half diagonal", 
     
    146146 
    147147def random(): 
     148    """Return a random parameter set for the model.""" 
    148149    a, b, c = 10**np.random.uniform(1, 4.7, size=3) 
    149150    pars = dict( 
Note: See TracChangeset for help on using the changeset viewer.