Changeset a807206 in sasmodels for sasmodels/models/stacked_disks.py
- Timestamp:
- Sep 30, 2016 10:42:06 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- caddb14, 5031ca3
- Parents:
- 2222134
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stacked_disks.py
r40a87fa ra807206 54 54 \right]^2 \sin{\alpha}\ d\alpha 55 55 56 where $d$ = thickness of the layer (* layer_thick*),57 $2h$ = core thickness (* core_thick*), and $R$ = radius of the disc (*radius*).56 where $d$ = thickness of the layer (*thick_layer*), 57 $2h$ = core thickness (*thick_core*), and $R$ = radius of the disc (*radius*). 58 58 59 59 .. math:: 60 60 61 61 S(q) = 1 + \frac{1}{2}\sum_{k=1}^n(n-k)\cos{(kDq\cos{\alpha})} 62 \exp\left[ -k(q\cos{\alpha})^2\sigma_D /2\right]62 \exp\left[ -k(q\cos{\alpha})^2\sigma_Dnn/2\right] 63 63 64 64 where $n$ is the total number of the disc stacked (*n_stacking*), 65 65 $D = 2(d+h)$ is the next neighbor center-to-center distance (d-spacing), 66 and $\sigma_D $ = the Gaussian standard deviation of the d-spacing (*sigma_d*).66 and $\sigma_Dnn$ = the Gaussian standard deviation of the d-spacing (*sigma_dnn*). 67 67 68 68 .. note:: 69 Each ass mebly in the stack is layer/core/layer, so the spacing of the69 Each assembly in the stack is layer/core/layer, so the spacing of the 70 70 cores is core plus two layers. The 2nd virial coefficient of the cylinder 71 71 is calculated based on the *radius* and *length* 72 = *n_stacking* * (* core_thick* + 2 * *layer_thick*)72 = *n_stacking* * (*thick_core* + 2 * *thick_layer*) 73 73 values, and used as the effective radius for $S(Q)$ when $P(Q) * S(Q)$ 74 74 is applied. … … 114 114 One layer of disk consists of a core, a top layer, and a bottom layer. 115 115 radius = the radius of the disk 116 core_thick= thickness of the core117 layer_thick= thickness of a layer116 thick_core = thickness of the core 117 thick_layer = thickness of a layer 118 118 sld_core = the SLD of the core 119 119 sld_layer = the SLD of the layers 120 120 n_stacking = the number of the disks 121 sigma_d = Gaussian STD of d-spacing121 sigma_dnn = Gaussian STD of d-spacing 122 122 sld_solvent = the SLD of the solvent 123 123 """ … … 127 127 # ["name", "units", default, [lower, upper], "type","description"], 128 128 parameters = [ 129 [" core_thick", "Ang", 10.0, [0, inf], "volume", "Thickness of the core disk"],130 [" layer_thick", "Ang", 10.0, [0, inf], "volume", "Thickness of layer each side of core"],129 ["thick_core", "Ang", 10.0, [0, inf], "volume", "Thickness of the core disk"], 130 ["thick_layer", "Ang", 10.0, [0, inf], "volume", "Thickness of layer each side of core"], 131 131 ["radius", "Ang", 15.0, [0, inf], "volume", "Radius of the stacked disk"], 132 132 ["n_stacking", "", 1.0, [0, inf], "volume", "Number of stacked layer/core/layer disks"], 133 ["sigma_d ", "Ang", 0, [0, inf], "", "GSD of disks sigma_d"],133 ["sigma_dnn", "Ang", 0, [0, inf], "", "Sigma of nearest neighbor spacing"], 134 134 ["sld_core", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Core scattering length density"], 135 135 ["sld_layer", "1e-6/Ang^2", 0.0, [-inf, inf], "sld", "Layer scattering length density"], … … 144 144 demo = dict(background=0.001, 145 145 scale=0.01, 146 core_thick=10.0,147 layer_thick=10.0,146 thick_core=10.0, 147 thick_layer=10.0, 148 148 radius=15.0, 149 149 n_stacking=1, 150 sigma_d =0,150 sigma_dnn=0, 151 151 sld_core=4, 152 152 sld_layer=0.0, … … 158 158 # Accuracy tests based on content in test/utest_extra_models.py. 159 159 # Added 2 tests with n_stacked = 5 using SasView 3.1.2 - PDB 160 [{' core_thick': 10.0,161 ' layer_thick': 15.0,162 'radius': 3000.0, 163 'n_stacking': 1.0, 164 'sigma_d ': 0.0,160 [{'thick_core': 10.0, 161 'thick_layer': 15.0, 162 'radius': 3000.0, 163 'n_stacking': 1.0, 164 'sigma_dnn': 0.0, 165 165 'sld_core': 4.0, 166 166 'sld_layer': -0.4, … … 172 172 }, 0.001, 5075.12], 173 173 174 [{' core_thick': 10.0,175 ' layer_thick': 15.0,174 [{'thick_core': 10.0, 175 'thick_layer': 15.0, 176 176 'radius': 3000.0, 177 177 'n_stacking': 5.0, 178 'sigma_d ': 0.0,178 'sigma_dnn': 0.0, 179 179 'sld_core': 4.0, 180 180 'sld_layer': -0.4, … … 186 186 }, 0.001, 5065.12793824], 187 187 188 [{' core_thick': 10.0,189 ' layer_thick': 15.0,188 [{'thick_core': 10.0, 189 'thick_layer': 15.0, 190 190 'radius': 3000.0, 191 191 'n_stacking': 5.0, 192 'sigma_d ': 0.0,192 'sigma_dnn': 0.0, 193 193 'sld_core': 4.0, 194 194 'sld_layer': -0.4, … … 200 200 }, 0.164, 0.0127673597265], 201 201 202 [{' core_thick': 10.0,203 ' layer_thick': 15.0,204 'radius': 3000.0, 205 'n_stacking': 1.0, 206 'sigma_d ': 0.0,202 [{'thick_core': 10.0, 203 'thick_layer': 15.0, 204 'radius': 3000.0, 205 'n_stacking': 1.0, 206 'sigma_dnn': 0.0, 207 207 'sld_core': 4.0, 208 208 'sld_layer': -0.4, … … 214 214 }, [0.001, 90.0], [5075.12, 0.001]], 215 215 216 [{' core_thick': 10.0,217 ' layer_thick': 15.0,218 'radius': 3000.0, 219 'n_stacking': 1.0, 220 'sigma_d ': 0.0,216 [{'thick_core': 10.0, 217 'thick_layer': 15.0, 218 'radius': 3000.0, 219 'n_stacking': 1.0, 220 'sigma_dnn': 0.0, 221 221 'sld_core': 4.0, 222 222 'sld_layer': -0.4, … … 228 228 }, ([0.4, 0.5]), [0.00105074, 0.00121761]], 229 229 230 [{' core_thick': 10.0,231 ' layer_thick': 15.0,232 'radius': 3000.0, 233 'n_stacking': 1.0, 234 'sigma_d ': 0.0,230 [{'thick_core': 10.0, 231 'thick_layer': 15.0, 232 'radius': 3000.0, 233 'n_stacking': 1.0, 234 'sigma_dnn': 0.0, 235 235 'sld_core': 4.0, 236 236 'sld_layer': -0.4,
Note: See TracChangeset
for help on using the changeset viewer.