Changeset 20c856a in sasmodels for sasmodels/models/rpa.c


Ignore:
Timestamp:
Mar 7, 2017 1:19:23 AM (8 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
9ae85f0, 3a45c2c
Parents:
f4b36fa
Message:

Final rpa model corrections (correct scale and units) and verified with
one of original authors on paper. Fixes #593.

while documentation was updated minimally to be usable it could use more
thorough work as can many which is the subject of other tickets. Also
annoying is that the example plot is useless. It is however
autogenerated from "default parameters" which is not helpful in this
particular case. Will submit new ticket for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/rpa.c

    racfb094 r20c856a  
    309309 
    310310  //calculate contrast where L[i] is the scattering length of i and D is the matrix 
    311   //need to verify why the sqrt of Nav rather than just Nav (assuming v is molar volume) 
     311  //Note that should multiply by Nav to get units of SLD which will become 
     312  // Nav*2 in the next line (SLD^2) but then normalization in that line would 
     313  //need to divide by Nav leaving only Nav or sqrt(Nav) before squaring.  
    312314  Nav=6.022045e+23; 
    313315  Lad=(L[0]/v[0]-L[3]/v[3])*sqrt(Nav); 
     
    317319  Intg=Lad*Lad*S11+Lbd*Lbd*S22+Lcd*Lcd*S33+2.0*Lad*Lbd*S12+2.0*Lbd*Lcd*S23+2.0*Lad*Lcd*S13; 
    318320 
    319   //rescale for units of Lij^2 (in 10e-12 m^2 to m^2 ?) 
    320   Intg *= 1.0e-24;     
     321  //rescale for units of Lij^2 (fm^2 to cm^2) 
     322  Intg *= 1.0e-26;     
    321323 
    322324  return Intg; 
Note: See TracChangeset for help on using the changeset viewer.