Changeset 44f39a2 in sasmodels


Ignore:
Timestamp:
Mar 20, 2016 5:48:20 AM (9 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3044216
Parents:
a10da8b
Message:

A few comments added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_iq.c

    ra10da8b r44f39a2  
    6262calculator treats the parameter set as one long vector. 
    6363 
     64Let's assume we have 6 polydisperse parameters 
     650 : sld_solvent {s1 = constant} 
     661: sld_material {s2 = constant} 
     672: radius   {r = vector of 10pts} 
     683: lenghth {l = vector of 30pts} 
     694: background {b = constant} 
     705: scale {s = constant} 
     71 
    6472The polydisperse parameters are stored in as an array of parameter 
    6573indices, one for each polydisperse parameter, stored in pd_par[n]. 
     74For the above mentioned expample that will give pd_par = {3, 2, x, x}, 
     75where x stands for abitrary number and 3 corresponds to longest parameter (lenght). 
    6676Non-polydisperse parameters do not appear in this array. Each polydisperse 
    67 parameter has a weight vector whose length is stored in pd_length[n]. 
    68 The weights are stored in a contiguous vector of weights for all 
    69 parameters, with the starting position for the each parameter stored 
    70 in pd_offset[n].  The values corresponding to the weights are stored 
    71 together in a separate weights[] vector, with offset stored in 
    72 par_offset[pd_par[n]]. Polydisperse parameters should be stored in 
    73 decreasing order of length for highest efficiency. 
     77parameter has a weight vector whose length is stored in pd_length[n], 
     78In our case pd_length = {30,10,0,0}. The weights are stored in 
     79a contiguous vector of weights for all parameters, with the starting position 
     80for the each parameter stored in pd_offset[n] (pd_offset = {10,0,x,x}. 
     81The values corresponding to the weights are stored together in a 
     82separate weights[] vector, with offset stored in par_offset[pd_par[n]]. 
     83In the above mentioned example weight = {r0, .., r9, l0, .., l29}. 
     84Polydisperse parameters should be stored in decreasing order of length 
     85for highest efficiency. 
    7486 
    7587We limit the number of polydisperse dimensions to MAX_PD (currently 4). 
     
    8597separate value for the sld.  The caller must provide a coordination table 
    8698for each parameter containing the value for each parameter given the 
    87 value of the polydisperse parameters v1, v2, etc.   The tables for each 
     99value of the polydisperse parameters v1, v2, etc.  The tables for each 
    88100parameter are arranged contiguously in a vector, with offset[k] giving the 
    89101starting location of parameter k in the vector.  Each parameter defines 
     
    266278        result[i] *= norm_vol[i]/vol[i]; 
    267279      } 
    268       //TODO: Ask Richard if scale and background may be corridanted parameters 
    269       result[i] = scale*result[i]/norm[i]+background; 
     280        result[i] = scale*result[i]/norm[i]+background; 
    270281    } 
    271282  } 
Note: See TracChangeset for help on using the changeset viewer.