core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 5d4777d was
5d4777d,
checked in by Paul Kienzle <pkienzle@…>, 10 years ago
|
reorganize, check and update models
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | r""" |
---|
2 | |
---|
3 | """ |
---|
4 | |
---|
5 | from numpy import pi, inf |
---|
6 | |
---|
7 | name = "sphere" |
---|
8 | title = "Spheres with uniform SLD" |
---|
9 | description = """\ |
---|
10 | [Sphere Form Factor] |
---|
11 | """ |
---|
12 | |
---|
13 | parameters = [ |
---|
14 | # [ "name", "units", default, [lower, upper], "type", |
---|
15 | # "description" ], |
---|
16 | [ "sld", "1e-6/Ang^2", 1, [-inf,inf], "", |
---|
17 | "Layer scattering length density" ], |
---|
18 | [ "solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "", |
---|
19 | "Solvent scattering length density" ], |
---|
20 | [ "radius", "Ang", 50, [0, inf], "volume", |
---|
21 | "Sphere radius" ], |
---|
22 | ] |
---|
23 | |
---|
24 | |
---|
25 | # No volume normalization despite having a volume parameter |
---|
26 | # This should perhaps be volume normalized? |
---|
27 | form_volume = """ |
---|
28 | return REAL(1.333333333333333)*M_PI*radius*radius*radius; |
---|
29 | """ |
---|
30 | |
---|
31 | Iq = """ |
---|
32 | real sn, cn; |
---|
33 | const real qr = q*radius; |
---|
34 | SINCOS(qr, sn, cn); |
---|
35 | const real bes = (qr==REAL(0.0) ? REAL(1.0) : (REAL(3.0)*(sn-qr*cn))/(qr*qr*qr)); |
---|
36 | const real f = bes * (sld - solvent_sld) * form_volume(radius); |
---|
37 | return REAL(1.0e-4)*f*f; |
---|
38 | """ |
---|
39 | |
---|
40 | |
---|
41 | Iqxy = """ |
---|
42 | // never called since no orientation or magnetic parameters. |
---|
43 | return REAL(-1.0); |
---|
44 | """ |
---|
45 | |
---|
46 | def ER(radius): |
---|
47 | return radius |
---|
48 | |
---|
49 | # VR defaults to 1.0 |
---|
Note: See
TracBrowser
for help on using the repository browser.