Changeset ce27e21 in sasmodels for sasmodels/models/cylinder.c
- Timestamp:
- Aug 24, 2014 5:18:14 PM (10 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:
- 1780d59
- Parents:
- 14de349
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.c
r14de349 rce27e21 140 140 DOCUMENTATION END 141 141 */ 142 real volume(real radius, real length);142 real form_volume(real radius, real length); 143 143 real Iq(real q, real sld, real solvent_sld, real radius, real length); 144 144 real Iqxy(real qx, real qy, real sld, real solvent_sld, real radius, real length, real theta, real phi); 145 145 146 146 147 real volume(real radius, real length)147 real form_volume(real radius, real length) 148 148 { 149 149 return M_PI*radius*radius*length; 150 150 } 151 152 151 153 152 real Iq(real q, … … 170 169 // NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vcyl 171 170 // The additional volume factor is for polydisperse volume normalization. 172 const real s = (sld - solvent_sld) * volume(radius, length);171 const real s = (sld - solvent_sld) * form_volume(radius, length); 173 172 return REAL(1.0e-4) * form * s * s; 174 173 } … … 203 202 const real bj = (besarg == REAL(0.0) ? REAL(0.5) : J1(besarg)/besarg); 204 203 const real si = (siarg == REAL(0.0) ? REAL(1.0) : sin(siarg)/siarg); 205 const real form = REAL(4.0)*bj*bj*si*si;204 const real form = bj*bj*si*si; 206 205 207 206 // Multiply by contrast^2, normalize by cylinder volume and convert to cm-1 208 207 // NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vcyl 209 208 // The additional volume factor is for polydisperse volume normalization. 210 const real s = (sld - solvent_sld) * volume(radius, length);209 const real s = (sld - solvent_sld) * form_volume(radius, length); 211 210 return REAL(1.0e-4) * form * s * s; // * correction; 212 211 }
Note: See TracChangeset
for help on using the changeset viewer.