Ignore:
Timestamp:
Nov 29, 2017 11:13:23 AM (6 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:
237b800f
Parents:
a839b22
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_parallelepiped.py

    r8c7d5d5 r2d81cfe  
    55Calculates the form factor for a rectangular solid with a core-shell structure. 
    66The thickness and the scattering length density of the shell or 
    7 "rim" can be different on each (pair) of faces. However at this time 
    8 the 1D calculation does **NOT** actually calculate a c face rim despite the presence of 
    9 the parameter. Some other aspects of the 1D calculation may be wrong. 
     7"rim" can be different on each (pair) of faces. However at this time the 1D 
     8calculation does **NOT** actually calculate a c face rim despite the presence 
     9of the parameter. Some other aspects of the 1D calculation may be wrong. 
    1010 
    1111.. note:: 
     
    5151 
    5252    F_{a}(Q,\alpha,\beta)= 
    53     \left[\frac{\sin(\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha \sin\beta)}{\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha\sin\beta} 
    54     - \frac{\sin(\tfrac{1}{2}QL_A\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_A\sin\alpha \sin\beta} \right] 
    55     \left[\frac{\sin(\tfrac{1}{2}QL_B\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_B\sin\alpha \sin\beta} \right] 
    56     \left[\frac{\sin(\tfrac{1}{2}QL_C\sin\alpha \sin\beta)}{\tfrac{1}{2}QL_C\sin\alpha \sin\beta} \right] 
     53    \left[\frac{\sin(\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha \sin\beta) 
     54               }{\tfrac{1}{2}Q(L_A+2t_A)\sin\alpha\sin\beta} 
     55    - \frac{\sin(\tfrac{1}{2}QL_A\sin\alpha \sin\beta) 
     56           }{\tfrac{1}{2}QL_A\sin\alpha \sin\beta} \right] 
     57    \left[\frac{\sin(\tfrac{1}{2}QL_B\sin\alpha \sin\beta) 
     58               }{\tfrac{1}{2}QL_B\sin\alpha \sin\beta} \right] 
     59    \left[\frac{\sin(\tfrac{1}{2}QL_C\sin\alpha \sin\beta) 
     60               }{\tfrac{1}{2}QL_C\sin\alpha \sin\beta} \right] 
    5761 
    5862.. note:: 
     
    9498 
    9599    Definition of the angles for oriented core-shell parallelepipeds. 
    96     Note that rotation $\theta$, initially in the $xz$ plane, is carried out first, then 
    97     rotation $\phi$ about the $z$ axis, finally rotation $\Psi$ is now around the axis of the cylinder. 
    98     The neutron or X-ray beam is along the $z$ axis. 
     100    Note that rotation $\theta$, initially in the $xz$ plane, is carried 
     101    out first, then rotation $\phi$ about the $z$ axis, finally rotation 
     102    $\Psi$ is now around the axis of the cylinder. The neutron or X-ray 
     103    beam is along the $z$ axis. 
    99104 
    100105.. figure:: img/parallelepiped_angle_projection.png 
     
    182187 
    183188def random(): 
    184     import numpy as np 
    185189    outer = 10**np.random.uniform(1, 4.7, size=3) 
    186190    thick = np.random.beta(0.5, 0.5, size=3)*(outer-2) + 1 
     
    216220    qx, qy = 0.2 * cos(pi/6.), 0.2 * sin(pi/6.) 
    217221    tests = [[{}, 0.2, 0.533149288477], 
    218             [{}, [0.2], [0.533149288477]], 
    219             [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0853299803222], 
    220             [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0853299803222]], 
     222             [{}, [0.2], [0.533149288477]], 
     223             [{'theta':10.0, 'phi':20.0}, (qx, qy), 0.0853299803222], 
     224             [{'theta':10.0, 'phi':20.0}, [(qx, qy)], [0.0853299803222]], 
    221225            ] 
    222226    del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.