Changeset e6fa43e in sasview for sansmodels/src/sans/models
- Timestamp:
- Aug 3, 2009 6:14:16 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:
- 0f3fefe
- Parents:
- ea07075
- Location:
- sansmodels/src/sans/models
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/FlexibleCylinderModel.py
r5068697 re6fa43e 38 38 contrast = 5.3e-006 [1/A²] 39 39 background = 0.0001 [1/cm] 40 axis_theta = 1.0 [rad]41 axis_phi = 1.0 [rad]42 40 43 41 """ … … 53 51 self.name = "FlexibleCylinderModel" 54 52 ## 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.""" 57 57 58 58 ## Parameter details [units, min, max] … … 64 64 self.details['contrast'] = ['[1/A²]', None, None] 65 65 self.details['background'] = ['[1/cm]', None, None] 66 self.details['axis_theta'] = ['[rad]', None, None]67 self.details['axis_phi'] = ['[rad]', None, None]68 66 69 67 ## 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'] 71 69 72 70 ## parameters with orientation 73 self.orientation_params =[ 'axis_phi', 'axis_theta', 'axis_phi.width', 'axis_theta.width']71 self.orientation_params =[] 74 72 75 73 def clone(self): -
sansmodels/src/sans/models/c_extensions/flexible_cylinder.h
rea07075 re6fa43e 13 13 during model fitting. 14 14 </text> 15 [FIXED]= <text>length.width; radius.width; , kuhn_length.width</text>15 [FIXED]= <text>length.width; kuhn_length.width; radius.width</text> 16 16 [ORIENTATION_PARAMS]= <text></text> 17 17 -
sansmodels/src/sans/models/c_models/flexiblecylinder.cpp
rea07075 re6fa43e 67 67 length.get_weights(weights_length); 68 68 69 // Get the dispersion points for the kuhn_length 70 vector<WeightPoint> weights_kuhn_length; 71 kuhn_length.get_weights(weights_kuhn_length); 72 69 73 // Get the dispersion points for the radius 70 74 vector<WeightPoint> weights_radius; … … 80 84 81 85 // 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; 84 88 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; 89 97 } 90 98 }
Note: See TracChangeset
for help on using the changeset viewer.