Changeset 15f52f8 in sasview


Ignore:
Timestamp:
Sep 14, 2009 6:13:10 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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
Message:

correction on the definition of total length

Location:
sansmodels/src/sans/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_models/coreshellcylinder.cpp

    rf9bf661 r15f52f8  
    230230        double norm = 0.0; 
    231231 
    232         // Get the dispersion points for the major shell 
     232        // Get the dispersion points for the length 
    233233        vector<WeightPoint> weights_length; 
    234234        length.get_weights(weights_length); 
    235235 
    236         // Get the dispersion points for the major shell 
     236        // Get the dispersion points for the thickness 
    237237        vector<WeightPoint> weights_thickness; 
    238238        thickness.get_weights(weights_thickness); 
    239239 
    240         // Get the dispersion points for the minor shell 
     240        // Get the dispersion points for the radius 
    241241        vector<WeightPoint> weights_radius ; 
    242242        radius.get_weights(weights_radius); 
     
    249249                        for(int k=0; k< (int)weights_radius.size(); k++) { 
    250250                                dp.radius = weights_radius[k].value; 
    251                                 //Note: output of "DiamCyl(dp.length,dp.radius)" is DIAMETER. 
     251                                //Note: output of "DiamCyl( )" is DIAMETER. 
    252252                                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; 
    254254                                norm += weights_length[i].weight* weights_thickness[j].weight* weights_radius[k].weight; 
    255255                        } 
     
    261261        else{ 
    262262                //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;} 
    265265 
    266266        return rad_out; 
  • sansmodels/src/sans/models/test/utest_model_calculate_ER.py

    r72a05d0 r15f52f8  
    9292        self.comp.setParam("length",400) 
    9393        self.diam.setParam("radius", 30) 
    94         self.diam.setParam("length",400)        
     94        self.diam.setParam("length",420)        
    9595        self.assertAlmostEqual(self.comp.calculate_ER(), self.diam.run(0.1)/2)    
    9696 
Note: See TracChangeset for help on using the changeset viewer.