Changeset c451be9 in sasview for sansmodels/src/sans/models/c_models/flexiblecylinder.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/flexiblecylinder.cpp
rf9bf661 rc451be9 79 79 double sum = 0.0; 80 80 double norm = 0.0; 81 double vol = 0.0; 81 82 82 83 // Loop over semi axis A weight points … … 91 92 for(int k=0; k< (int)weights_rad.size(); k++) { 92 93 dp[3] = weights_rad[k].value; 93 94 //Un-normalize by volume 94 95 sum += weights_len[i].weight 95 * weights_kuhn[j].weight*weights_rad[k].weight * FlexExclVolCyl(dp, q); 96 * weights_kuhn[j].weight*weights_rad[k].weight * FlexExclVolCyl(dp, q) 97 * pow(weights_rad[k].value,2)*weights_len[i].value; 98 //Find average volume 99 vol += weights_rad[k].weight 100 * weights_len[i].weight 101 * weights_kuhn[j].weight 102 *pow(weights_rad[k].value,2)*weights_len[i].value; 96 103 norm += weights_len[i].weight 97 104 * weights_kuhn[j].weight*weights_rad[k].weight; … … 99 106 } 100 107 } 108 if (vol != 0.0 && norm != 0.0) { 109 //Re-normalize by avg volume 110 sum = sum/(vol/norm);} 111 101 112 return sum/norm + background(); 102 113 }
Note: See TracChangeset
for help on using the changeset viewer.