Changeset d36facf in sasview
 Timestamp:
 Nov 30, 2011 10:41:07 AM (13 years ago)
 Branches:
 master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release4.1.1, release4.1.2, release4.2.2, release_4.0.1, ticket1009, ticket1094headless, ticket12422dresolution, ticket1243, ticket1249, ticket885, unittestsaveload
 Children:
 60bca1a
 Parents:
 0003cc3
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

park1.2.1/park/lib/resolution.c
r0003cc3 rd36facf 22 22 int sign = 1; 23 23 24 double t ;25 double y ;24 double t = 1.0; 25 double y = 1.0; 26 26 if (x < 0) 27 27 sign = 1; … … 179 179 const double two_sigma_sq = 2. * sigma * sigma; 180 180 double z, Glo, erflo, erfmin, R; 181 double zhi, Ghi, erfhi, m, b; 181 182 182 183 z = Qo  Qin[k]; … … 190 191 191 192 /* Compute the next endpoint */ 192 const doublezhi = Qo  Qin[k];193 const doubleGhi = exp(zhi*zhi/two_sigma_sq);194 const doubleerfhi = erf(zhi/(SQRT2*sigma));195 const doublem = (Rin[k]Rin[k1])/(Qin[k]Qin[k1]);196 const doubleb = Rin[k]  m * Qin[k];193 zhi = Qo  Qin[k]; 194 Ghi = exp(zhi*zhi/two_sigma_sq); 195 erfhi = erf(zhi/(SQRT2*sigma)); 196 m = (Rin[k]Rin[k1])/(Qin[k]Qin[k1]); 197 b = Rin[k]  m * Qin[k]; 197 198 198 199 /* Add the integrals. */ … … 235 236 { 236 237 int lo,out; 238 double sigma, Qo, limit; 237 239 238 240 /* FIXME fails if Qin are not sorted; slow if Q not sorted */ … … 243 245 for (out=0; out < N; out++) { 244 246 /* width of resolution window for Q is w = 2 dQ^2. */ 245 const doublesigma = dQ[out];246 const doubleQo = Q[out];247 const doublelimit = sqrt(2.*sigma*sigma* LOG_RESLIMIT);247 sigma = dQ[out]; 248 Qo = Q[out]; 249 limit = sqrt(2.*sigma*sigma* LOG_RESLIMIT); 248 250 249 251 /* if (out%20==0) printf("%d: Q,dQ = %g,%g\n",out,Qo,sigma); */
Note: See TracChangeset
for help on using the changeset viewer.