Changeset 15f52f8 in sasview for sansmodels/src
- Timestamp:
- Sep 14, 2009 4:13:10 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:
- 7ad9887
- Parents:
- 7a5fa98
- Location:
- sansmodels/src/sans/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/coreshellcylinder.cpp
rf9bf661 r15f52f8 230 230 double norm = 0.0; 231 231 232 // Get the dispersion points for the major shell232 // Get the dispersion points for the length 233 233 vector<WeightPoint> weights_length; 234 234 length.get_weights(weights_length); 235 235 236 // Get the dispersion points for the major shell236 // Get the dispersion points for the thickness 237 237 vector<WeightPoint> weights_thickness; 238 238 thickness.get_weights(weights_thickness); 239 239 240 // Get the dispersion points for the minor shell240 // Get the dispersion points for the radius 241 241 vector<WeightPoint> weights_radius ; 242 242 radius.get_weights(weights_radius); … … 249 249 for(int k=0; k< (int)weights_radius.size(); k++) { 250 250 dp.radius = weights_radius[k].value; 251 //Note: output of "DiamCyl( dp.length,dp.radius)" is DIAMETER.251 //Note: output of "DiamCyl( )" is DIAMETER. 252 252 sum +=weights_length[i].weight * weights_thickness[j].weight 253 * weights_radius[k].weight*DiamCyl(dp.length ,dp.radius+dp.thickness)/2.0;253 * weights_radius[k].weight*DiamCyl(dp.length+2.0*dp.thickness,dp.radius+dp.thickness)/2.0; 254 254 norm += weights_length[i].weight* weights_thickness[j].weight* weights_radius[k].weight; 255 255 } … … 261 261 else{ 262 262 //return normal value 263 //Note: output of "DiamCyl( dp.length,dp.radius)" is DIAMETER.264 rad_out = DiamCyl(dp.length ,dp.radius+dp.thickness)/2.0;}263 //Note: output of "DiamCyl()" is DIAMETER. 264 rad_out = DiamCyl(dp.length+2.0*dp.thickness,dp.radius+dp.thickness)/2.0;} 265 265 266 266 return rad_out; -
sansmodels/src/sans/models/test/utest_model_calculate_ER.py
r72a05d0 r15f52f8 92 92 self.comp.setParam("length",400) 93 93 self.diam.setParam("radius", 30) 94 self.diam.setParam("length",4 00)94 self.diam.setParam("length",420) 95 95 self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2) 96 96
Note: See TracChangeset
for help on using the changeset viewer.