Changeset 510e7ad in sasview
- Timestamp:
- Mar 10, 2011 11:40:05 AM (14 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, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- d4bf55e9
- Parents:
- 729bcf6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_smearer/smearer.cpp
r642b259 r510e7ad 265 265 // At the edge of each sub_width. weight += u(at q_high bin) - u(0), where u(0) = 0, 266 266 // and weighted by (2.0* npts_w -1.0)once for each q. 267 if (q == q_j) { 268 if (k==0) 269 (*weights)[i*nbins+j] += (sqrt(fabs((q_high)*(q_high)-q_shift * q_shift)))/q_0 * (2.0*double(npts_w)-1.0); 267 //if (q == q_j) { 268 if (q_low <= q_shift && q_high > q_shift) { 269 //if (k==0) 270 (*weights)[i*nbins+j] += (sqrt(fabs((q_high)*(q_high)-q_shift * q_shift)))/q_0;// * (2.0*double(npts_w)-1.0); 270 271 } 271 272 // For the rest of sub_width. weight += u(at q_high bin) - u(at q_low bin) 272 else if (u > 0.0){273 else{// if (u > 0.0){ 273 274 (*weights)[i*nbins+j] += (sqrt(fabs((q_high)*(q_high)- q_shift * q_shift))-sqrt(fabs((q_low)*(q_low)- q_shift * q_shift)))/q_0 ; 274 275 } … … 298 299 // Compute the fraction of the Gaussian contributing 299 300 // to the q_j bin between q_jmin and q_jmax 300 double value = erf( (q_jmax-q)/(sqrt(2.0)*width[i]) );301 long double value = erf( (q_jmax-q)/(sqrt(2.0)*width[i]) ); 301 302 value -= erf( (q_jmin-q)/(sqrt(2.0)*width[i]) ); 302 303 (*weights)[i*nbins+j] += value;
Note: See TracChangeset
for help on using the changeset viewer.