Changeset c451be9 in sasview for sansmodels/src/sans/models/c_models/coreshellsphere.cpp
- Timestamp:
- Jan 7, 2010 5:04:25 PM (15 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:
- dfa8832
- Parents:
- 4cbaf35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/coreshellsphere.cpp
rf9bf661 rc451be9 75 75 double sum = 0.0; 76 76 double norm = 0.0; 77 double vol = 0.0; 77 78 78 79 // Loop over radius weight points … … 83 84 for(int j=0; j<weights_thick.size(); j++) { 84 85 dp[2] = weights_thick[j].value; 86 //Un-normalize SphereForm by volume 87 sum += weights_rad[i].weight 88 * weights_thick[j].weight * CoreShellForm(dp, q)* pow(weights_rad[i].value+weights_thick[j].value,3); 85 89 86 sum += weights_rad[i].weight 87 * weights_thick[j].weight * CoreShellForm(dp, q); 90 //Find average volume 91 vol += weights_rad[i].weight * weights_thick[j].weight 92 * pow(weights_rad[i].value+weights_thick[j].value,3); 88 93 norm += weights_rad[i].weight 89 94 * weights_thick[j].weight; 90 95 } 91 96 } 97 98 if (vol != 0.0 && norm != 0.0) { 99 //Re-normalize by avg volume 100 sum = sum/(vol/norm);} 101 92 102 return sum/norm + background(); 93 103 }
Note: See TracChangeset
for help on using the changeset viewer.