Ignore:
Timestamp:
Aug 21, 2009 12:34:33 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:
14c3887
Parents:
bda194e3
Message:

some corrections and removed polydispersity from inside of function and set dQ =0

File:
1 edited

Legend:

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

    rb4679de rc1c29b6  
    3939        delta     = Parameter(30.0); 
    4040        delta.set_min(0.0); 
    41         sigma    = Parameter(0.15); 
    42         sigma.set_min(0.0); 
    4341        contrast   = Parameter(5.3e-6); 
    4442        n_plates     = Parameter(20.0); 
     
    5553 */ 
    5654double LamellarPSModel :: operator()(double q) { 
    57         double dp[8]; 
     55        double dp[7]; 
    5856 
    5957        // Fill parameter array for IGOR library 
     
    6260        dp[1] = spacing(); 
    6361        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; 
    6966 
    7067 
    71         // Get the dispersion points for (delta) thickness 
     68        // Get the dispersion points for spacing and delta (thickness) 
    7269        vector<WeightPoint> weights_spacing; 
    7370        spacing.get_weights(weights_spacing); 
     71        vector<WeightPoint> weights_delta; 
     72        delta.get_weights(weights_delta); 
    7473 
    7574        // Perform the computation, with all weight points 
     
    8079        for(int i=0; i< (int)weights_spacing.size(); i++) { 
    8180                dp[1] = weights_spacing[i].value; 
     81                for(int j=0; j< (int)weights_spacing.size(); j++) { 
     82                        dp[2] = weights_delta[i].value; 
    8283 
    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                } 
    8687        } 
    8788        return sum/norm + background(); 
     
    108109        return (*this).operator()(q); 
    109110} 
     111 
Note: See TracChangeset for help on using the changeset viewer.