Changeset 44f39a2 in sasmodels
- Timestamp:
- Mar 20, 2016 7:48:20 AM (9 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
ra10da8b r44f39a2 62 62 calculator treats the parameter set as one long vector. 63 63 64 Let's assume we have 6 polydisperse parameters 65 0 : sld_solvent {s1 = constant} 66 1: sld_material {s2 = constant} 67 2: radius {r = vector of 10pts} 68 3: lenghth {l = vector of 30pts} 69 4: background {b = constant} 70 5: scale {s = constant} 71 64 72 The polydisperse parameters are stored in as an array of parameter 65 73 indices, one for each polydisperse parameter, stored in pd_par[n]. 74 For the above mentioned expample that will give pd_par = {3, 2, x, x}, 75 where x stands for abitrary number and 3 corresponds to longest parameter (lenght). 66 76 Non-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. 77 parameter has a weight vector whose length is stored in pd_length[n], 78 In our case pd_length = {30,10,0,0}. The weights are stored in 79 a contiguous vector of weights for all parameters, with the starting position 80 for the each parameter stored in pd_offset[n] (pd_offset = {10,0,x,x}. 81 The values corresponding to the weights are stored together in a 82 separate weights[] vector, with offset stored in par_offset[pd_par[n]]. 83 In the above mentioned example weight = {r0, .., r9, l0, .., l29}. 84 Polydisperse parameters should be stored in decreasing order of length 85 for highest efficiency. 74 86 75 87 We limit the number of polydisperse dimensions to MAX_PD (currently 4). … … 85 97 separate value for the sld. The caller must provide a coordination table 86 98 for each parameter containing the value for each parameter given the 87 value of the polydisperse parameters v1, v2, etc. 99 value of the polydisperse parameters v1, v2, etc. The tables for each 88 100 parameter are arranged contiguously in a vector, with offset[k] giving the 89 101 starting location of parameter k in the vector. Each parameter defines … … 266 278 result[i] *= norm_vol[i]/vol[i]; 267 279 } 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; 270 281 } 271 282 }
Note: See TracChangeset
for help on using the changeset viewer.