Changeset 5258859 in sasmodels
- Timestamp:
- Dec 21, 2015 9:31:18 AM (9 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:
- c138211
- Parents:
- f4f3919
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/resolution.py
r9404dd3 r5258859 175 175 176 176 I_s(q_i) = \frac{1}{\Delta q_\perp} 177 \int_0^{\Delta q_\perp} I(\sqrt{q_i^2 + q_\perp^2} dq_\perp 177 \int_0^{\Delta q_\perp} 178 I\left(\sqrt{q_i^2 + q_\perp^2}\right) \,dq_\perp 178 179 179 180 If slit width is large relative to height, use: … … 183 184 I_s(q_i) = \frac{1}{2 \Delta q_\parallel} 184 185 \int_{-\Delta q_\parallel}^{\Delta q_\parallel} 185 I (|q_i + q_\parallel|)dq_\parallel186 I\left(|q_i + q_\parallel|\right) \,dq_\parallel 186 187 187 188 For a mixture of slit width and height use: … … 190 191 191 192 I_s(q_i) = \frac{1}{2 \Delta q_\parallel \Delta q_\perp} 192 \int_{-\Delta q_\parallel )^{\Delta q_parallel}193 \int_0^ [\Delta q_\perp}194 I (\sqrt{(q_i + q_\parallel)^2 + q_\perp^2})195 dq_\perp dq_\parallel193 \int_{-\Delta q_\parallel}^{\Delta q_\parallel} 194 \int_0^{\Delta q_\perp} 195 I\left(\sqrt{(q_i + q_\parallel)^2 + q_\perp^2}\right) 196 \,dq_\perp dq_\parallel 196 197 197 198 … … 203 204 .. math:: 204 205 205 I_s(q) = W 206 I_s(q) = W\,I(q_\text{calc}) 206 207 207 208 If *q_calc* is at the mid-point, we can infer the bin edges from the … … 225 226 difference between consecutive edges which have been first converted 226 227 to $u$. Only $u_j \in [0, \Delta q_\perp]$ are used, which corresponds 227 to $q_j \in [q, \sqrt{q^2 + \Delta q_\perp}]$, so228 to $q_j \in \left[q, \sqrt{q^2 + \Delta q_\perp}\right]$, so 228 229 229 230 .. math:: 230 231 231 232 W_{ij} = \frac{1}{\Delta q_\perp} \Delta u_j 232 = \frac{1}{\Delta q_\perp} 233 \sqrt{q_{j+1}^2 - q_i^2} - \sqrt{q_j^2 - q_i^2} 234 \ text{if} q_j \in [q_i, \sqrt{q_i^2 + q_\perp^2}]233 = \frac{1}{\Delta q_\perp} \left( 234 \sqrt{q_{j+1}^2 - q_i^2} - \sqrt{q_j^2 - q_i^2} \right) 235 \ \text{if}\ q_j \in \left[q_i, \sqrt{q_i^2 + q_\perp^2}\right] 235 236 236 237 where $I_s(q_i)$ is the theory function being computed and $q_j$ are the … … 249 250 .. math:: 250 251 251 u_j = |q_j - q|252 u_j = \left|q_j - q\right| 252 253 253 254 so … … 255 256 .. math:: 256 257 257 W_ ij= \frac{1}{2 \Delta q_\parallel} \Delta u_j258 W_{ij} = \frac{1}{2 \Delta q_\parallel} \Delta u_j 258 259 = \frac{1}{2 \Delta q_\parallel} (q_{j+1} - q_j) 259 \text{if} q_j \in [q-\Delta q_\parallel, q+\Delta q_\parallel] 260 \ \text{if}\ q_j \in 261 \left[q-\Delta q_\parallel, q+\Delta q_\parallel\right] 260 262 261 263 However, we need to support cases were $u_j < 0$, which means using 262 $2 (q_{j+1} - q_j)$ when $q_j \in [0, q_\parallel-q_i]$. This is not263 an issue for $q_i > q_\parallel$.264 265 For bot $q_\perp > 0$ and $q_\parallel > 0$ we perform a 2 dimensional264 $2 (q_{j+1} - q_j)$ when $q_j \in \left[0, q_\parallel-q_i\right]$. 265 This is not an issue for $q_i > q_\parallel$. 266 267 For both $q_\perp > 0$ and $q_\parallel > 0$ we perform a 2 dimensional 266 268 integration with 267 269 268 270 .. math:: 269 271 270 u_ jk= \sqrt{q_j^2 - (q + (k\Delta q_\parallel/L))^2}271 \ text{for}k = -L \ldots L272 u_{jk} = \sqrt{q_j^2 - (q + (k\Delta q_\parallel/L))^2} 273 \ \text{for}\ k = -L \ldots L 272 274 273 275 for $L$ = *n_height*. This gives … … 276 278 277 279 W_{ij} = \frac{1}{2 \Delta q_\perp q_\parallel} 278 \sum_{k=-L}^L \Delta u_jk (\frac{\Delta q_\parallel}{2 L + 1} 280 \sum_{k=-L}^L \Delta u_{jk} 281 \left(\frac{\Delta q_\parallel}{2 L + 1}\right) 279 282 280 283 … … 329 332 """ 330 333 Given *q* and *q_width*, find a set of sampling points *q_calc* so 331 that each point I(q)has sufficient support from the underlying334 that each point $I(q)$ has sufficient support from the underlying 332 335 function. 333 336 """
Note: See TracChangeset
for help on using the changeset viewer.