Changeset c451be9 in sasview for sansmodels/src/sans/models/c_models/multishell.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/multishell.cpp
rf9bf661 rc451be9 80 80 double sum = 0.0; 81 81 double norm = 0.0; 82 double vol = 0.0; 82 83 83 84 // Loop over radius weight points … … 88 89 for(int k=0; k< (int)weights_w_thickness.size(); k++){ 89 90 dp[3] = weights_w_thickness[k].value; 90 91 //Un-normalize SphereForm by volume 91 92 sum += weights_core_radius[i].weight*weights_s_thickness[j].weight 92 *weights_w_thickness[k].weight* MultiShell(dp, q); 93 *weights_w_thickness[k].weight* MultiShell(dp, q) 94 *pow(weights_core_radius[i].value+dp[6]*weights_s_thickness[j].value+(dp[6]-1)*weights_w_thickness[k].value,3); 95 //Find average volume 96 vol += weights_core_radius[i].weight*weights_s_thickness[j].weight 97 *weights_w_thickness[k].weight 98 *pow(weights_core_radius[i].value+dp[6]*weights_s_thickness[j].value+(dp[6]-1)*weights_w_thickness[k].value,3); 93 99 norm += weights_core_radius[i].weight*weights_s_thickness[j].weight 94 100 *weights_w_thickness[k].weight; … … 96 102 } 97 103 } 104 if (vol != 0.0 && norm != 0.0) { 105 //Re-normalize by avg volume 106 sum = sum/(vol/norm);} 98 107 return sum/norm + background(); 99 108 }
Note: See TracChangeset
for help on using the changeset viewer.