Changeset 0cfeff4 in sasview for sansmodels/src/sans/models/c_extensions/lamellar.c
- Timestamp:
- Aug 20, 2009 5:32:26 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:
- fe11a3fa
- Parents:
- 222d75c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/lamellar.c
r975ec8e r0cfeff4 10 10 #include <stdlib.h> 11 11 12 /* LamellarFFX : calculates the form factor of a lamellar structure - no S(q) effects included 13 -NO polydispersion included 14 */ 15 double lamellar_kernel(double dp[], double q){ 16 double scale,del,sld_bi,sld_sol,contr,bkg; //local variables of coefficient wave 17 double inten, qval,Pq; 18 double Pi; 19 20 21 Pi = 4.0*atan(1.0); 22 scale = dp[0]; 23 del = dp[1]; 24 sld_bi = dp[2]; 25 sld_sol = dp[3]; 26 bkg = dp[4]; 27 qval = q; 28 contr = sld_bi -sld_sol; 29 30 Pq = 2.0*contr*contr/qval/qval*(1.0-cos(qval*del)); 31 32 inten = 2.0*Pi*scale*Pq/(qval*qval); //this is now dimensionless... 33 34 inten /= del; //normalize by the thickness (in A) 35 36 inten *= 1.0e8; // 1/A to 1/cm 37 38 return(inten+bkg); 39 } 12 40 13 41 /**
Note: See TracChangeset
for help on using the changeset viewer.