[9da407c] | 1 | r""" |
---|
| 2 | Definition |
---|
| 3 | ---------- |
---|
| 4 | |
---|
[693570c] | 5 | The form factor for this bent disc is essentially that of a hyperbolic |
---|
| 6 | paraboloid and calculated as |
---|
[9da407c] | 7 | |
---|
| 8 | .. math:: |
---|
| 9 | |
---|
[693570c] | 10 | P(q) = (\Delta \rho )^2 V \int^{\pi/2}_0 d\psi \sin{\psi} sinc^2 |
---|
[9da407c] | 11 | \left( \frac{qd\cos{\psi}}{2} \right) |
---|
| 12 | \left[ \left( S^2_0+C^2_0\right) + 2\sum_{n=1}^{\infty} |
---|
[693570c] | 13 | \left( S^2_n+C^2_n\right) \right] |
---|
[9da407c] | 14 | |
---|
| 15 | where |
---|
| 16 | |
---|
| 17 | .. math:: |
---|
| 18 | |
---|
[693570c] | 19 | C_n = \int^{R}_{0} r dr\cos(qr^2\alpha \cos{\psi}) |
---|
[9da407c] | 20 | J_n\left( qr^2\beta \cos{\psi}\right) |
---|
| 21 | J_{2n}\left( qr \sin{\psi}\right) |
---|
| 22 | |
---|
| 23 | .. math:: |
---|
| 24 | |
---|
[693570c] | 25 | S_n = \int^{R}_{0} r dr\sin(qr^2\alpha \cos{\psi}) |
---|
[9da407c] | 26 | J_n\left( qr^2\beta \cos{\psi}\right) |
---|
| 27 | J_{2n}\left( qr \sin{\psi}\right) |
---|
| 28 | |
---|
[693570c] | 29 | and $\Delta \rho \text{ is } \rho_{pringle}-\rho_{solvent}$, $V$ is the volume of |
---|
| 30 | the disc, $\psi$ is the angle between the normal to the disc and the q vector, |
---|
| 31 | $d$ and $R$ are the "pringle" thickness and radius respectively, $\alpha$ and |
---|
| 32 | $\beta$ are the two curvature parameters, and $J_n$ is the n\ :sup:`th` order |
---|
| 33 | Bessel function of the first kind. |
---|
[9da407c] | 34 | |
---|
[693570c] | 35 | .. figure:: img/pringles_fig1.png |
---|
[9da407c] | 36 | |
---|
[693570c] | 37 | Schematic of model shape (Graphic from Matt Henderson, matt@matthen.com) |
---|
[9da407c] | 38 | |
---|
| 39 | Reference |
---|
| 40 | --------- |
---|
| 41 | |
---|
[693570c] | 42 | Karen Edler, Universtiy of Bath, Private Communication. 2012. |
---|
| 43 | Derivation by Stefan Alexandru Rautu. |
---|
| 44 | |
---|
| 45 | **Author:** Andrew Jackson **on:** 2008 |
---|
| 46 | |
---|
| 47 | **Last Modified by:** Wojciech Wpotrzebowski **on:** March 20, 2016 |
---|
| 48 | |
---|
| 49 | **Last Reviewed by:** Paul Butler **on:** March 21, 2016 |
---|
[9da407c] | 50 | |
---|
| 51 | """ |
---|
| 52 | |
---|
| 53 | from numpy import inf, pi |
---|
| 54 | |
---|
[693570c] | 55 | name = "pringle" |
---|
| 56 | title = "The Pringle model provides the form factor, $P(q)$, for a 'pringle' \ |
---|
| 57 | or 'saddle-shaped' disc that is bent in two directions." |
---|
[9da407c] | 58 | description = """\ |
---|
| 59 | |
---|
| 60 | """ |
---|
| 61 | category = "shape:cylinder" |
---|
| 62 | |
---|
| 63 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 64 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 65 | parameters = [ |
---|
| 66 | ["radius", "Ang", 60.0, [0, inf], "volume", "Pringle radius"], |
---|
| 67 | ["thickness", "Ang", 10.0, [0, inf], "volume", "Thickness of pringle"], |
---|
[63e7f0d] | 68 | ["alpha", "", 0.001, [-inf, inf], "", "Curvature parameter alpha"], |
---|
| 69 | ["beta", "", 0.02, [-inf, inf], "", "Curvature paramter beta"], |
---|
| 70 | ["sld_pringle", "1e-6/Ang^2", 1.0, [-inf, inf], "", "Pringle sld"], |
---|
| 71 | ["sld_solvent", "1e-6/Ang^2", 6.3, [-inf, inf], "", "Solvent sld"] |
---|
[9da407c] | 72 | ] |
---|
| 73 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 74 | |
---|
[012b374] | 75 | source = ["lib/polevl.c", "lib/sas_J0.c", "lib/sas_J1.c", \ |
---|
[b70cb3b] | 76 | "lib/sas_JN.c", "lib/gauss76.c", "pringle.c"] |
---|
[9da407c] | 77 | |
---|
| 78 | def ER(radius, thickness): |
---|
| 79 | """ |
---|
| 80 | Return equivalent radius (ER) |
---|
| 81 | """ |
---|
| 82 | ddd = 0.75 * radius * (2 * radius * thickness + (thickness + radius) \ |
---|
| 83 | * (thickness + pi * radius)) |
---|
| 84 | return 0.5 * (ddd) ** (1. / 3.) |
---|
| 85 | |
---|
| 86 | demo = dict(background=0.0, |
---|
| 87 | scale=1.0, |
---|
| 88 | radius=60.0, |
---|
| 89 | thickness=10.0, |
---|
| 90 | alpha=0.001, |
---|
| 91 | beta=0.02, |
---|
| 92 | sld_pringle=1.0, |
---|
| 93 | sld_solvent=6.35) |
---|
| 94 | |
---|
| 95 | tests = [ |
---|
| 96 | [{'scale' : 1.0, |
---|
| 97 | 'radius': 60.0, |
---|
| 98 | 'thickness': 10.0, |
---|
| 99 | 'alpha': 0.001, |
---|
| 100 | 'beta': 0.02, |
---|
| 101 | 'sld_pringle': 1.0, |
---|
| 102 | 'sld_solvent': 6.3, |
---|
| 103 | 'background': 6.3, |
---|
| 104 | }, 0.1, 16.185532], |
---|
| 105 | |
---|
| 106 | [{'scale' : 1.0, |
---|
| 107 | 'radius': 60.0, |
---|
| 108 | 'thickness': 10.0, |
---|
| 109 | 'alpha': 0.001, |
---|
| 110 | 'beta': 0.02, |
---|
| 111 | 'sld_pringle': 1.0, |
---|
| 112 | 'sld_solvent': 6.3, |
---|
| 113 | 'background': 6.3, |
---|
| 114 | }, 0.01, 297.153496], |
---|
| 115 | |
---|
| 116 | [{'scale' : 1.0, |
---|
| 117 | 'radius': 60.0, |
---|
| 118 | 'thickness': 10.0, |
---|
| 119 | 'alpha': 0.001, |
---|
| 120 | 'beta': 0.02, |
---|
| 121 | 'sld_pringle': 1.0, |
---|
| 122 | 'sld_solvent': 6.3, |
---|
| 123 | 'background': 6.3, |
---|
| 124 | }, 0.001, 324.021256415], |
---|
| 125 | |
---|
| 126 | [{'scale' : 1.0, |
---|
| 127 | 'radius': 60.0, |
---|
| 128 | 'thickness': 10.0, |
---|
| 129 | 'alpha': 0.001, |
---|
| 130 | 'beta': 0.02, |
---|
| 131 | 'sld_pringle': 1.0, |
---|
| 132 | 'sld_solvent': 6.3, |
---|
| 133 | 'background': 6.3, |
---|
| 134 | }, (0.001, 90.0), 6.30000026876], |
---|
[91b8b80] | 135 | ] |
---|