Ignore:
Timestamp:
Jul 24, 2007 3:23:44 PM (16 years ago)
Author:
srkline
Message:

LOTS of changes to the analysis ipf files:

-- see sphere.ipf for the simplest example of the changes --

  • #pragma Igor 6
  • #if directive to look for XOP
  • AAO unsmeared functions
  • STRUCT functions for smearing (also AAO)
  • new wrappers for dependencies to struct functions

(2006 models have NOT been completed yet, only the old models)

  • loading data files into data folders (PlotUtils?) + some streamlining of the loaders
  • Smear_Model_N is now AAO + some streamlining of the quadrature code

-- SHS and SW structure factor XOPs are crashing (need DP wave, I may have old XOP)
-- this breaks fitting of the smeared models until wrappers can be devised
-- all packages will be broken due to the new data folder structure
-- multiple instances of functions will now cause problems (MSA)
-- RPA model is a problem with its odd functional form (extra wave)

-- lots of other carnage to follow as the bugs and typos are shaken out

24 JUL 2007 SRK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/HPMSA.ipf

    r42 r127  
    11#pragma rtGlobals=1             // Use modern global access method. 
    2  
     2#pragma IgorVersion = 6.0 
     3 
     4// converted to Igor code by Paul Butler 
     5// 
    36Proc PlotHayterPenfoldMSA(num,qmin,qmax) 
    47        Variable num=128, qmin=.001, qmax=.3 
     
    2326        make/o/t parameters_hpmsa = {"Diameter (A)","Charge","Volume Fraction","Temperature(K)","monovalent salt conc. (M)","dielectric constant of solvent"} 
    2427        Edit parameters_hpmsa,coef_hpmsa 
    25         ywave_hpmsa := HayterPenfoldMSA(coef_hpmsa,xwave_hpmsa) 
     28        Variable/G root:g_HPMSA 
     29        g_hpmsa := HayterPenfoldMSA(coef_hpmsa,ywave_hpmsa,xwave_hpmsa) 
     30//      ywave_hpmsa := HayterPenfoldMSA(coef_hpmsa,xwave_hpmsa) 
    2631        xdiamwave_hpmsa:=xwave_hpmsa*coef_hpmsa[0] 
    2732        //Display ywave_hpmsa vs xdiamwave_hpmsa         
     
    3338End 
    3439 
     40//AAO version 
     41Function HayterPenfoldMSA(cw,yw,xw) : FitFunc 
     42        Wave cw,yw,xw 
     43 
     44#if exists("HayterPenfoldMSAX") 
     45        yw = HayterPenfoldMSAX(cw,xw) 
     46#else 
     47        yw = fHayterPenfoldMSA(cw,xw) 
     48#endif 
     49        return(0) 
     50End 
     51 
    3552////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
    3653// 
     
    4461//                     A POWER OF 2 
    4562// 
    46  
    47 Function HayterPenfoldMSA(w,x) : FitFunc 
     63Function fHayterPenfoldMSA(w,x) : FitFunc 
    4864        wave w 
    4965        variable x 
     
    769785                qcosk = qk*cosk 
    770786                aqk = gMSAWave[0]*(sink-qcosk) 
    771                 aqk=aqk+gMSAWave[1]*((2.0*qk2-1.0)*qcosk+2.0*sink-2.0/qk) 
    772                 inter=24.0*qk3+4.0*(1.0-6.0*qk2)*sink 
    773                 aqk=(aqk+0.5*etaz*gMSAWave[0]*(inter-(1.0-12.0*qk2+24.0*qk2*qk2)*qcosk))*qk3 
    774                 aqk=aqk +gMSAWave[2]*(ck*asink-sk*qcosk)*qqk 
    775                 aqk=aqk +gMSAWave[3]*(sk*asink-qk*(ck*cosk-1.0))*qqk 
    776                 aqk=aqk +gMSAWave[3]*(cosk-1.0)*qk2 
    777                 aqk=aqk -gekz*(asink+qcosk)*qqk 
     787        aqk=aqk+gMSAWave[1]*((2.0*qk2-1.0)*qcosk+2.0*sink-2.0/qk) 
     788                inter=24.0*qk3+4.0*(1.0-6.0*qk2)*sink 
     789                aqk=(aqk+0.5*etaz*gMSAWave[0]*(inter-(1.0-12.0*qk2+24.0*qk2*qk2)*qcosk))*qk3 
     790                aqk=aqk +gMSAWave[2]*(ck*asink-sk*qcosk)*qqk 
     791                aqk=aqk +gMSAWave[3]*(sk*asink-qk*(ck*cosk-1.0))*qqk 
     792                aqk=aqk +gMSAWave[3]*(cosk-1.0)*qk2 
     793                aqk=aqk -gekz*(asink+qcosk)*qqk 
    778794                SofQ = 1.0/(1.0-e24*aqk) 
    779795      endif 
Note: See TracChangeset for help on using the changeset viewer.