Ignore:
Timestamp:
Apr 12, 2010 9:26:51 AM (12 years ago)
Author:
srkline
Message:

fixed the P*S combinations in Fuzzy Spheres.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2009/FuzzySpheres_Sq_v40.ipf

    r656 r682  
    1616// 
    1717// AJJ Feb 2010 
     18// added the lorentzian SRK APR 2010. this is a little different than other P*S, since the  
     19// Lorentzian is not scaled by phi, but rather is added on to the high q independently. 
     20// -- so it must be tacked on at the end, just like the form factor 
    1821 
    1922 
     
    3639        Make/O/D/N=(num) xwave_fuzz_HS,ywave_fuzz_HS 
    3740        xwave_fuzz_HS = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 
    38         Make/O/D coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,0.001} 
    39         make/O/T parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkg (cm-1 sr-1)"} 
     41        Make/O/D coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.001} 
     42        make/O/T parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","bkg (cm-1 sr-1)"} 
    4043        Edit parameters_fuzz_HS,coef_fuzz_HS 
    4144         
     
    6467         
    6568        // Setup parameter table for model function 
    66         Make/O/D smear_coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,0.001}                                   
    67         make/o/t smear_parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","bkg (cm-1 sr-1)"}        
     69        Make/O/D smear_coef_fuzz_HS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.001}                                      
     70        make/o/t smear_parameters_fuzz_HS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","bkg (cm-1 sr-1)"}       
    6871        Edit smear_parameters_fuzz_HS,smear_coef_fuzz_HS                                         
    6972         
     
    9497         
    9598        //setup form factor coefficient wave 
    96         Make/O/D/N=7 form_fuzz_HS 
    97         form_fuzz_HS[0] = 1 
     99        Make/O/D/N=9 form_fuzz_HS 
     100        form_fuzz_HS[0] = w[0]          // send the real volume fraction in here, so the scaling is done correctly 
    98101        form_fuzz_HS[1] = w[1] 
    99102        form_fuzz_HS[2] = w[2] 
     
    101104        form_fuzz_HS[4] = w[4] 
    102105        form_fuzz_HS[5] = w[5] 
    103         form_fuzz_HS[6] = 0 
     106        form_fuzz_HS[6] = w[6]                  // w[6] is  the Lorentzian scale 
     107        form_fuzz_HS[7] = w[7] 
     108        form_fuzz_HS[8] = 0 
    104109         
    105110        //calculate the diameter of the effective one-component sphere 
     
    120125        Duplicate/O xw tmp_fuzz_HS_PQ,tmp_fuzz_HS_SQ 
    121126        FuzzySpheres(form_fuzz_HS,tmp_fuzz_HS_PQ,xw) 
     127 
    122128        HardSphereStruct(struct_fuzz_HS,tmp_fuzz_HS_SQ,xw) 
    123129        yw = tmp_fuzz_HS_PQ * tmp_fuzz_HS_SQ 
    124         yw *= w[0] 
    125         yw += w[6] 
     130         
     131//      yw *= w[0]              // scaling is done in FuzzySpheres 
     132        yw += w[8] 
    126133         
    127134        //cleanup waves 
     
    140147        Make/O/D/N=(num) xwave_fuzz_SW,ywave_fuzz_SW 
    141148        xwave_fuzz_SW = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 
    142         Make/O/D coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1.0,1.2,0.001} 
    143         make/O/T parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"} 
     149        Make/O/D coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1,50,1.0,1.2,0.001} 
     150        make/O/T parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"} 
    144151        Edit parameters_fuzz_SW,coef_fuzz_SW 
    145152         
     
    168175         
    169176        // Setup parameter table for model function 
    170         Make/O/D smear_coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1.0,1.2,0.001}                                   
    171         make/o/t smear_parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"}         
     177        Make/O/D smear_coef_fuzz_SW = {0.01,60,0.2,10,1e-6,3e-6,1,50,1.0,1.2,0.001}                                      
     178        make/o/t smear_parameters_fuzz_SW = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","well depth (kT)","well width (diam.)","bkg (cm-1 sr-1)"}        
    172179        Edit smear_parameters_fuzz_SW,smear_coef_fuzz_SW                                         
    173180         
     
    197204         
    198205        //setup form factor coefficient wave 
    199         Make/O/D/N=7 form_fuzz_SW 
    200         form_fuzz_SW[0] = 1 
     206        Make/O/D/N=9 form_fuzz_SW 
     207        form_fuzz_SW[0] = w[0] 
    201208        form_fuzz_SW[1] = w[1] 
    202209        form_fuzz_SW[2] = w[2] 
     
    204211        form_fuzz_SW[4] = w[4] 
    205212        form_fuzz_SW[5] = w[5] 
    206         form_fuzz_SW[6] = 0 
     213        form_fuzz_SW[6] = w[6] 
     214        form_fuzz_SW[7] = w[7] 
     215        form_fuzz_SW[8] = 0 
    207216         
    208217        //calculate the diameter of the effective one-component sphere 
     
    218227        struct_fuzz_SW[0] = diam/2 
    219228        struct_fuzz_SW[1] = w[0] 
    220         struct_fuzz_SW[2] = w[6] 
    221         struct_fuzz_SW[3] = w[7] 
     229        struct_fuzz_SW[2] = w[8] 
     230        struct_fuzz_SW[3] = w[9] 
    222231         
    223232        //calculate each and combine 
     
    226235        SquareWellStruct(struct_fuzz_SW,tmp_fuzz_SW_SQ,xw) 
    227236        yw = tmp_fuzz_SW_PQ * tmp_fuzz_SW_SQ 
    228         yw *= w[0] 
    229         yw += w[8] 
     237         
     238//      yw *= w[0]              // scaling is done in FuzzySpheres 
     239        yw += w[10] 
    230240         
    231241        //cleanup waves 
     
    250260        Make/O/D/N=(num) xwave_fuzz_SC,ywave_fuzz_SC 
    251261        xwave_fuzz_SC = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 
    252         Make/O/D coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,20,0,298,78,0.001} 
    253         make/O/T parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"} 
     262        Make/O/D coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,1,50,20,0,298,78,0.001} 
     263        make/O/T parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"} 
    254264        Edit parameters_fuzz_SC,coef_fuzz_SC 
    255265         
     
    283293         
    284294        // Setup parameter table for model function 
    285         Make/O/D smear_coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,20,0,298,78,0.001}                                       
    286         make/o/t smear_parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"}       
     295        Make/O/D smear_coef_fuzz_SC = {0.01,60,0.2,10,1e-6,3e-6,1,50,20,0,298,78,0.001}                                  
     296        make/o/t smear_parameters_fuzz_SC = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","charge","movalent salt(M)","Temperature (K)","dielectric const","bkg (cm-1 sr-1)"}      
    287297        Edit smear_parameters_fuzz_SC,smear_coef_fuzz_SC                                         
    288298         
     
    312322         
    313323        //setup form factor coefficient wave 
    314         Make/O/D/N=7 form_fuzz_SC 
    315         form_fuzz_SC[0] = 1 
     324        Make/O/D/N=9 form_fuzz_SC 
     325        form_fuzz_SC[0] = w[0] 
    316326        form_fuzz_SC[1] = w[1] 
    317327        form_fuzz_SC[2] = w[2] 
     
    319329        form_fuzz_SC[4] = w[4] 
    320330        form_fuzz_SC[5] = w[5] 
    321         form_fuzz_SC[6] = 0 
     331        form_fuzz_SC[6] = w[6] 
     332        form_fuzz_SC[7] = w[7] 
     333        form_fuzz_SC[8] = 0 
    322334         
    323335        //calculate the diameter of the effective one-component sphere 
     
    332344        Make/O/D/N=6 struct_fuzz_SC 
    333345        struct_fuzz_SC[0] = diam 
    334         struct_fuzz_SC[1] = w[6] 
     346        struct_fuzz_SC[1] = w[8] 
    335347        struct_fuzz_SC[2] = w[0] 
    336         struct_fuzz_SC[3] = w[8] 
    337         struct_fuzz_SC[4] = w[7] 
    338         struct_fuzz_SC[5] = w[9] 
     348        struct_fuzz_SC[3] = w[10] 
     349        struct_fuzz_SC[4] = w[9] 
     350        struct_fuzz_SC[5] = w[11] 
    339351         
    340352        //calculate each and combine 
     
    343355        HayterPenfoldMSA(struct_fuzz_SC,tmp_fuzz_SC_SQ,xw) 
    344356        yw = tmp_fuzz_SC_PQ * tmp_fuzz_SC_SQ 
    345         yw *= w[0] 
    346         yw += w[10] 
     357         
     358//      yw *= w[0]              // scaling is done in FuzzySpheres 
     359        yw += w[12] 
    347360         
    348361        //cleanup waves 
     
    361374        Make/O/D/N=(num) xwave_fuzz_SHS,ywave_fuzz_SHS 
    362375        xwave_fuzz_SHS = alog( log(qmin) + x*((log(qmax)-log(qmin))/num) ) 
    363         Make/O/D coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,0.05,0.2,0.001} 
    364         make/O/T parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"} 
     376        Make/O/D coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.05,0.2,0.001} 
     377        make/O/T parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"} 
    365378        Edit parameters_fuzz_SHS,coef_fuzz_SHS 
    366379         
     
    389402         
    390403        // Setup parameter table for model function 
    391         Make/O/D smear_coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,0.05,0.2,0.001}                                         
    392         make/o/t smear_parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"}      
     404        Make/O/D smear_coef_fuzz_SHS = {0.01,60,0.2,10,1e-6,3e-6,1,50,0.05,0.2,0.001}                                    
     405        make/o/t smear_parameters_fuzz_SHS = {"Volume Fraction (scale)","mean radius (A)","polydisp (sig/avg)","interface thickness (A)","SLD sphere (A-2)","SLD solvent (A-2)","Lorentz Scale","Lorentz length","perturbation parameter (0.1)","stickiness, tau","bkg (cm-1 sr-1)"}     
    393406        Edit smear_parameters_fuzz_SHS,smear_coef_fuzz_SHS                                       
    394407         
     
    418431         
    419432        //setup form factor coefficient wave 
    420         Make/O/D/N=7 form_fuzz_SHS 
    421         form_fuzz_SHS[0] = 1 
     433        Make/O/D/N=9 form_fuzz_SHS 
     434        form_fuzz_SHS[0] = w[0] 
    422435        form_fuzz_SHS[1] = w[1] 
    423436        form_fuzz_SHS[2] = w[2] 
     
    425438        form_fuzz_SHS[4] = w[4] 
    426439        form_fuzz_SHS[5] = w[5] 
    427         form_fuzz_SHS[6] = 0 
     440        form_fuzz_SHS[6] = w[6] 
     441        form_fuzz_SHS[7] = w[7] 
     442        form_fuzz_SHS[8] = 0 
    428443         
    429444        //calculate the diameter of the effective one-component sphere 
     
    439454        struct_fuzz_SHS[0] = diam/2 
    440455        struct_fuzz_SHS[1] = w[0] 
    441         struct_fuzz_SHS[2] = w[6] 
    442         struct_fuzz_SHS[3] = w[7] 
     456        struct_fuzz_SHS[2] = w[8] 
     457        struct_fuzz_SHS[3] = w[9] 
    443458         
    444459        //calculate each and combine 
     
    447462        StickyHS_Struct(struct_fuzz_SHS,tmp_fuzz_SHS_SQ,xw) 
    448463        yw = tmp_fuzz_SHS_PQ * tmp_fuzz_SHS_SQ 
    449         yw *= w[0] 
    450         yw += w[8] 
     464         
     465//      yw *= w[0]              // scaling is done in FuzzySpheres 
     466        yw += w[10] 
    451467         
    452468        //cleanup waves 
Note: See TracChangeset for help on using the changeset viewer.