Ignore:
Timestamp:
Dec 6, 2010 5:24:17 PM (12 years ago)
Author:
srkline
Message:

Updated the parameter names for Raspberry models.

Added Macro to calculate the 2-yukawa potential and graph it.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2010
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2010/PolyRaspberry_v40.ipf

    r771 r772  
    2222        xwave_PolyRaspberry =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    2323        Make/O/D coef_PolyRaspberry = {0.05,5000,0.1,-4e-7,0.005,100,0.4,3.5e-6,0,6.3e-6,0.0}                    
    24         make/o/t parameters_PolyRaspberry =  {"vf Large","Radius Large (A)","pd Large Sphere","SLD Large sphere (A-2)","vf Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
     24        make/o/t parameters_PolyRaspberry =  {"vol fract Large","Radius Large (A)","pd of radius Large Sphere (0,1)","SLD Large sphere (A-2)","vol fract Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
    2525        Edit parameters_PolyRaspberry, coef_PolyRaspberry 
    2626         
     
    5252        // Setup parameter table for model function 
    5353        Make/O/D smear_coef_PolyRaspberry = {0.05,5000,0.1,-4e-7,0.005,100,0.4,3.5e-6,0,6.3e-6,0.0} 
    54         make/o/t smear_parameters_PolyRaspberry = {"vf Large","Radius Large (A)","pd Large Sphere","SLD Large sphere (A-2)","vf Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
     54        make/o/t smear_parameters_PolyRaspberry = {"vol fract Large","Radius Large (A)","pd of radius Large Sphere (0,1)","SLD Large sphere (A-2)","vol fract Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
    5555        Edit smear_parameters_PolyRaspberry,smear_coef_PolyRaspberry                                    //display parameters in a table 
    5656         
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2010/Raspberry_v40.ipf

    r771 r772  
    2424        xwave_Raspberry =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    2525        Make/O/D coef_Raspberry = {0.05,5000,-4e-7,0.005,100,0.4,3.5e-6,0,6.3e-6,0.0}                    
    26         make/o/t parameters_Raspberry =  {"vf Large","Radius Large (A)","SLD Large sphere (A-2)","vf Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
     26        make/o/t parameters_Raspberry =  {"vol fract Large","Radius Large (A)","SLD Large sphere (A-2)","vol fract Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
    2727        Edit parameters_Raspberry, coef_Raspberry 
    2828         
     
    6262        // Setup parameter table for model function 
    6363        Make/O/D smear_coef_Raspberry = {0.05,5000,-4e-7,0.005,100,0.4,3.5e-6,0,6.3e-6,0.0} 
    64         make/o/t smear_parameters_Raspberry = {"vf Large","Radius Large (A)","SLD Large sphere (A-2)","vf Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
     64        make/o/t smear_parameters_Raspberry = {"vol fract Large","Radius Large (A)","SLD Large sphere (A-2)","vol fract Small", "Radius Small (A)","surface coverage","SLD Small sphere (A-2)","delta","SLD solvent (A-2)","bkgd (cm-1)"} 
    6565        Edit smear_parameters_Raspberry,smear_coef_Raspberry                                    //display parameters in a table 
    6666         
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2010/Yukawa_SQ_v40.ipf

    r770 r772  
    199199        return (0) 
    200200End 
     201 
     202 
     203Macro Plot_2YukawaPotential() 
     204        fPlot_2YukawaPotential() 
     205End 
     206 
     207Function fPlot_2YukawaPotential() 
     208 
     209        Variable k1,z1,k2,z2,radius 
     210        Variable ii=0,num=500,rmax=10,rval 
     211         
     212        if(exists("root:coef_2yuk") == 0) 
     213                Abort "You must plot the 2-Yukawa model before plotting the potential" 
     214        else 
     215                WAVE coef_2yuk = root:coef_2yuk 
     216        endif 
     217         
     218        radius = coef_2yuk[1] 
     219        K1 = coef_2yuk[2] 
     220        Z1 = coef_2yuk[3] 
     221        K2 = coef_2yuk[4] 
     222        Z2 = coef_2yuk[5] 
     223 
     224        Make/O/D/N=(num) TwoYukawa_Potential,TwoYukawa_Potential_r 
     225        TwoYukawa_Potential_r = x/num*rmax 
     226         
     227        do 
     228                rval = TwoYukawa_Potential_r[ii] 
     229                if(rval <= 1) 
     230                        TwoYukawa_Potential[ii] = inf 
     231                else 
     232                        TwoYukawa_Potential[ii] = -1*K1*(exp(-1*Z1*(rval-1))/rval) - K2*exp(-1*Z2*(rval-1))/rval 
     233                endif 
     234         
     235                ii+=1 
     236        while(ii<num) 
     237         
     238         
     239//      if graph is not open, draw a graph 
     240        DoWindow YukawaPotential 
     241        if(V_flag == 0) 
     242                Display/N=YukawaPotential TwoYukawa_Potential vs TwoYukawa_Potential_r 
     243                ModifyGraph marker=29,msize=2,mode=4,grid=1,mirror=2 
     244                Label bottom "r/Diameter" 
     245                Label left "V(r)/kT" 
     246        endif 
     247         
     248        return(0) 
     249End 
     250 
    201251 
    202252 
Note: See TracChangeset for help on using the changeset viewer.