Changeset e6fa43e in sasview for sansmodels


Ignore:
Timestamp:
Aug 3, 2009 6:14:16 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:
0f3fefe
Parents:
ea07075
Message:

more corrections on this model

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

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/FlexibleCylinderModel.py

    r5068697 re6fa43e  
    3838         contrast        = 5.3e-006 [1/A²] 
    3939         background      = 0.0001 [1/cm] 
    40          axis_theta      = 1.0 [rad] 
    41          axis_phi        = 1.0 [rad] 
    4240 
    4341    """ 
     
    5351        self.name = "FlexibleCylinderModel" 
    5452        ## Model description 
    55         self.description =""" Note : scale and contrast are both multiplicative factors in the model and are perfectly 
    56                 correlated. One or both of these parameters must be held fixed during model fitting.""" 
     53        self.description =""" Note : 'scale' and 'contrast' are both multiplicative factors in the 
     54                model and are perfectly correlated. One or 
     55                both of these parameters must be held fixed 
     56                during model fitting.""" 
    5757        
    5858                ## Parameter details [units, min, max] 
     
    6464        self.details['contrast'] = ['[1/A²]', None, None] 
    6565        self.details['background'] = ['[1/cm]', None, None] 
    66         self.details['axis_theta'] = ['[rad]', None, None] 
    67         self.details['axis_phi'] = ['[rad]', None, None] 
    6866 
    6967                ## fittable parameters 
    70         self.fixed=['length.width', 'radius.width', 'axis_theta.width', 'axis_phi.width'] 
     68        self.fixed=['length.width', 'kuhn_length.width', 'radius.width'] 
    7169         
    7270        ## parameters with orientation 
    73         self.orientation_params =['axis_phi', 'axis_theta', 'axis_phi.width', 'axis_theta.width'] 
     71        self.orientation_params =[] 
    7472    
    7573    def clone(self): 
  • sansmodels/src/sans/models/c_extensions/flexible_cylinder.h

    rea07075 re6fa43e  
    1313                during model fitting. 
    1414                </text> 
    15         [FIXED]= <text>length.width; radius.width; , kuhn_length.width</text> 
     15        [FIXED]= <text>length.width; kuhn_length.width; radius.width</text> 
    1616        [ORIENTATION_PARAMS]= <text></text> 
    1717 
  • sansmodels/src/sans/models/c_models/flexiblecylinder.cpp

    rea07075 re6fa43e  
    6767        length.get_weights(weights_length); 
    6868 
     69        // Get the dispersion points for the kuhn_length 
     70        vector<WeightPoint> weights_kuhn_length; 
     71        kuhn_length.get_weights(weights_kuhn_length); 
     72 
    6973        // Get the dispersion points for the radius 
    7074        vector<WeightPoint> weights_radius; 
     
    8084 
    8185                // Loop over semi axis B weight points 
    82                 for(int j=0; j< (int)weights_radius.size(); j++) { 
    83                         dp[2] = weights_radius[j].value; 
     86                for(int j=0; j< (int)weights_kuhn_length.size(); j++) { 
     87                        dp[2] = weights_kuhn_length[j].value; 
    8488 
    85                         sum += weights_length[i].weight 
    86                                 * weights_radius[j].weight * FlexExclVolCyl(dp, q); 
    87                         norm += weights_length[i].weight 
    88                                         * weights_radius[j].weight; 
     89                        // Loop over semi axis C weight points 
     90                        for(int k=0; k< (int)weights_radius.size(); k++) { 
     91                                dp[3] = weights_radius[k].value; 
     92 
     93                                sum += weights_length[i].weight 
     94                                        * weights_kuhn_length[j].weight * weights_radius[k].weight * FlexExclVolCyl(dp, q); 
     95                                norm += weights_length[i].weight 
     96                                        * weights_kuhn_length[j]*weights_radius[k].weight; 
    8997                } 
    9098        } 
Note: See TracChangeset for help on using the changeset viewer.