Changeset c1c29b6 in sasview for sansmodels/src/sans/models/c_models/lamellarPS.cpp
- Timestamp:
- Aug 21, 2009 12:34:33 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:
- 14c3887
- Parents:
- bda194e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/lamellarPS.cpp
rb4679de rc1c29b6 39 39 delta = Parameter(30.0); 40 40 delta.set_min(0.0); 41 sigma = Parameter(0.15);42 sigma.set_min(0.0);43 41 contrast = Parameter(5.3e-6); 44 42 n_plates = Parameter(20.0); … … 55 53 */ 56 54 double LamellarPSModel :: operator()(double q) { 57 double dp[ 8];55 double dp[7]; 58 56 59 57 // Fill parameter array for IGOR library … … 62 60 dp[1] = spacing(); 63 61 dp[2] = delta(); 64 dp[3] = sigma(); 65 dp[4] = contrast(); 66 dp[5] = n_plates(); 67 dp[6] = caille(); 68 dp[7] = 0.0; 62 dp[3] = contrast(); 63 dp[4] = n_plates(); 64 dp[5] = caille(); 65 dp[6] = 0.0; 69 66 70 67 71 // Get the dispersion points for (delta) thickness68 // Get the dispersion points for spacing and delta (thickness) 72 69 vector<WeightPoint> weights_spacing; 73 70 spacing.get_weights(weights_spacing); 71 vector<WeightPoint> weights_delta; 72 delta.get_weights(weights_delta); 74 73 75 74 // Perform the computation, with all weight points … … 80 79 for(int i=0; i< (int)weights_spacing.size(); i++) { 81 80 dp[1] = weights_spacing[i].value; 81 for(int j=0; j< (int)weights_spacing.size(); j++) { 82 dp[2] = weights_delta[i].value; 82 83 83 sum += weights_spacing[i].weight * LamellarPS(dp, q);84 norm += weights_spacing[i].weight;85 84 sum += weights_spacing[i].weight * weights_delta[j].weight * LamellarPS_kernel(dp, q); 85 norm += weights_spacing[i].weight * weights_delta[j].weight; 86 } 86 87 } 87 88 return sum/norm + background(); … … 108 109 return (*this).operator()(q); 109 110 } 111
Note: See TracChangeset
for help on using the changeset viewer.