Changeset 7c35fda in sasmodels
- Timestamp:
- May 31, 2018 10:07:31 AM (9 months ago)
- Branches:
- master, F1F2models_grethe, beta_approx, cuda-test, py3, ticket-1015-gpu-mem-error, ticket-1015-quick-fix, ticket-1022-sum_multiplicity, ticket-1157, ticket-608-user-defined-weights, ticket_1156, webgl_jitter_viewer
- Children:
- befe905
- Parents:
- 84e89cd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
r84e89cd r7c35fda 83 83 in_spin = clip(in_spin, 0.0, 1.0); 84 84 out_spin = clip(out_spin, 0.0, 1.0); 85 // Note: sasview 3.1 scaled all slds by sqrt(weight) and assumed that 85 // Previous version of this function took the square root of the weights, 86 // under the assumption that 87 // 86 88 // w*I(q, rho1, rho2, ...) = I(q, sqrt(w)*rho1, sqrt(w)*rho2, ...) 87 // which is likely to be the case for simple models. 89 // 90 // However, since the weights are applied to the final intensity and 91 // are not interned inside the I(q) function, we want the full 92 // weight and not the square root. Any function using 93 // set_spin_weights as part of calculating an amplitude will need to 94 // manually take that square root, but there is currently no such 95 // function. 88 96 weight[0] = (1.0-in_spin) * (1.0-out_spin); // dd 89 97 weight[1] = (1.0-in_spin) * out_spin; // du
Note: See TracChangeset
for help on using the changeset viewer.