Changeset 39c2de9 in sasmodels
- Timestamp:
- Aug 29, 2018 9:53:55 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 992299c
- Parents:
- 0168844 (diff), 70530778 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (08/29/18 09:53:55)
- git-committer:
- GitHub <noreply@…> (08/29/18 09:53:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
r7c35fda r70530778 84 84 out_spin = clip(out_spin, 0.0, 1.0); 85 85 // Previous version of this function took the square root of the weights, 86 // under the assumption that 86 // under the assumption that 87 87 // 88 88 // w*I(q, rho1, rho2, ...) = I(q, sqrt(w)*rho1, sqrt(w)*rho2, ...) … … 188 188 QACRotation *rotation, 189 189 double qx, double qy, 190 double *qa _out, double *qc_out)190 double *qab_out, double *qc_out) 191 191 { 192 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 192 193 const double dqc = rotation->R31*qx + rotation->R32*qy; 193 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 194 const double dqa = sqrt(-dqc*dqc + qx*qx + qy*qy); 195 196 *qa_out = dqa; 194 const double dqab_sq = -dqc*dqc + qx*qx + qy*qy; 195 //*qab_out = sqrt(fabs(dqab_sq)); 196 *qab_out = dqab_sq > 0.0 ? sqrt(dqab_sq) : 0.0; 197 197 *qc_out = dqc; 198 198 }
Note: See TracChangeset
for help on using the changeset viewer.