Changeset 451


Ignore:
Timestamp:
Nov 18, 2008 3:21:34 PM (14 years ago)
Author:
srkline
Message:

Bug fixes for some of the newly added (2008) Analysis model functions. All are tested now and should be correct.

Also included in these changes are a few bug fixes in the package loader and Correct

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/BCC_ParaCrystal_v40.ipf

    r445 r451  
    3333        Make/O/D/n=(num) xwave_BCC_ParaCrystal, ywave_BCC_ParaCrystal 
    3434        xwave_BCC_ParaCrystal =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    35         Make/O/D coef_BCC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    36         make/o/t parameters_BCC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"}     
     35        Make/O/D coef_BCC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     36        make/o/t parameters_BCC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD Sphere (A-2)","SLD Solvent (A-2)", "Background (cm-1)"}   
    3737        Edit parameters_BCC_ParaCrystal, coef_BCC_ParaCrystal 
    3838         
     
    7373         
    7474        // Setup parameter table for model function 
    75         Make/O/D smear_coef_BCC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    76         make/o/t smear_parameters_BCC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"} 
     75        Make/O/D smear_coef_BCC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     76        make/o/t smear_parameters_BCC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD Sphere (A-2)","SLD Solvent (A-2)", "Background (cm-1)"} 
    7777        Edit smear_parameters_BCC_ParaCrystal,smear_coef_BCC_ParaCrystal                                        //display parameters in a table 
    7878         
     
    131131         
    132132 
    133         Variable scale,Dnn,gg,Rad,contrast,background,yy,latticeScale 
     133        Variable scale,Dnn,gg,Rad,contrast,background,yy,latticeScale,sld,sldSolv 
    134134        scale = w[0] 
    135135        Dnn = w[1] //Nearest neighbor distance A 
    136136        gg = w[2] //Paracrystal distortion factor 
    137137        Rad = w[3] //Sphere radius 
    138         contrast = w[4] //SLD contrast  
    139         background = w[5]  
     138        sld = w[4] 
     139        sldSolv = w[5] 
     140        background = w[6]  
     141         
     142        contrast = sld - sldSolv 
    140143         
    141144        //Volume fraction calculated from lattice symmetry and sphere radius 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/BroadPeak_v40.ipf

    r445 r451  
    144144 
    145145//      the name of your unsmeared model (AAO) is the first argument 
    146         Smear_Model_20(BroadPeak,s.coefW,s.xW,s.yW,s.resW) 
     146        Smear_Model_76(BroadPeak,s.coefW,s.xW,s.yW,s.resW) 
    147147 
    148148        return(0) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/ConvexLens_v40.ipf

    r449 r451  
    118118        rad = w[1] 
    119119//      len = w[2] 
    120         endRad = w[3] 
    121         sldc = w[4] 
    122         slds = w[5] 
    123         bkg = w[6] 
     120        endRad = w[2] 
     121        sldc = w[3] 
     122        slds = w[4] 
     123        bkg = w[5] 
    124124 
    125125        hDist = -1*sqrt(abs(endRad^2-rad^2)) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/Core_and_NShells_v40.ipf

    r444 r451  
    106106        Make/O/D/n=(num) xwave_FourShell, ywave_FourShell 
    107107        xwave_FourShell =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    108         Make/O/D coef_FourShell ={1.,60,6.4e-6,10,1e-6,10,2e-6,5,3e-6,10,4e-6,6.4e-6,0.001} 
     108        Make/O/D coef_FourShell ={1.,60,6.4e-6,10,1e-6,10,2e-6,10,3e-6,10,4e-6,6.4e-6,0.001} 
    109109        make/o/t parameters_FourShell = {"scale","core radius (A)","Core SLD (A-2)","Shell 1 thickness","Shell 1 SLD (A-2)","Shell 2 thickness","Shell 2 SLD (A-2)","Shell 3 thickness","Shell 3 SLD (A-2)","Shell 4 thickness","Shell 4 SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"} 
    110110        Edit parameters_FourShell, coef_FourShell 
     
    215215         
    216216        // Setup parameter table for model function 
    217         Make/O/D smear_coef_ThreeShell =  {1.,60,6.4e-6,10,1e-6,10,2e-6,5,3e-6,6.4e-6,0.001} 
     217        Make/O/D smear_coef_ThreeShell =  {1.,60,6.4e-6,10,1e-6,10,2e-6,10,3e-6,6.4e-6,0.001} 
    218218        make/o/t smear_parameters_ThreeShell =  {"scale","core radius (A)","Core SLD (A-2)","Shell 1 thickness","Shell 1 SLD (A-2)","Shell 2 thickness","Shell 2 SLD (A-2)","Shell 3 thickness","Shell 3 SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"} 
    219219        Edit smear_parameters_ThreeShell,smear_coef_ThreeShell                                  //display parameters in a table 
     
    249249         
    250250        // Setup parameter table for model function 
    251         Make/O/D smear_coef_FourShell = {1.,60,6.4e-6,10,1e-6,10,2e-6,5,3e-6,10,4e-6,6.4e-6,0.001} 
     251        Make/O/D smear_coef_FourShell = {1.,60,6.4e-6,10,1e-6,10,2e-6,10,3e-6,10,4e-6,6.4e-6,0.001} 
    252252        make/o/t smear_parameters_FourShell =  {"scale","core radius (A)","Core SLD (A-2)","Shell 1 thickness","Shell 1 SLD (A-2)","Shell 2 thickness","Shell 2 SLD (A-2)","Shell 3 thickness","Shell 3 SLD (A-2)","Shell 4 thickness","Shell 4 SLD (A-2)","Solvent SLD (A-2)","bkg (cm-1)"} 
    253253        Edit smear_parameters_FourShell,smear_coef_FourShell                                    //display parameters in a table 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/FCC_ParaCrystal_v40.ipf

    r445 r451  
    3333        Make/O/D/n=(num) xwave_FCC_ParaCrystal, ywave_FCC_ParaCrystal 
    3434        xwave_FCC_ParaCrystal =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    35         Make/O/D coef_FCC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    36         make/o/t parameters_FCC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"}     
     35        Make/O/D coef_FCC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     36        make/o/t parameters_FCC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)", "Background (cm-1)"}   
    3737        Edit parameters_FCC_ParaCrystal, coef_FCC_ParaCrystal 
    3838         
     
    7373         
    7474        // Setup parameter table for model function 
    75         Make/O/D smear_coef_FCC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    76         make/o/t smear_parameters_FCC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"} 
     75        Make/O/D smear_coef_FCC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     76        make/o/t smear_parameters_FCC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)", "Background (cm-1)"} 
    7777        Edit smear_parameters_FCC_ParaCrystal,smear_coef_FCC_ParaCrystal                                        //display parameters in a table 
    7878         
     
    131131         
    132132 
    133         Variable scale,Dnn,gg,Rad,contrast,background,yy,latticeScale 
     133        Variable scale,Dnn,gg,Rad,contrast,background,yy,latticeScale,sld,sldSolv 
    134134        scale = w[0] 
    135135        Dnn = w[1] //Nearest neighbor distance A 
    136136        gg = w[2] //Paracrystal distortion factor 
    137137        Rad = w[3] //Sphere radius 
    138         contrast = w[4] //SLD contrast  
    139         background = w[5]  
     138        sld = w[4] 
     139        sldSolv = w[5] 
     140        background = w[6]  
    140141                 
    141 // always calculate for type 2, FCC 
     142        contrast = sld - sldSolv 
    142143         
    143144        latticeScale = 4*(4/3)*pi*(Rad^3)/((Dnn*(2^0.5))^3) 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/SC_ParaCrystal_v40.ipf

    r445 r451  
    3333        Make/O/D/n=(num) xwave_SC_ParaCrystal, ywave_SC_ParaCrystal 
    3434        xwave_SC_ParaCrystal =  alog(log(qmin) + x*((log(qmax)-log(qmin))/num)) 
    35         Make/O/D coef_SC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    36         make/o/t parameters_SC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"}      
     35        Make/O/D coef_SC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     36        make/o/t parameters_SC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)", "Background (cm-1)"}    
    3737        Edit parameters_SC_ParaCrystal, coef_SC_ParaCrystal 
    3838         
     
    7373         
    7474        // Setup parameter table for model function 
    75         Make/O/D smear_coef_SC_ParaCrystal = {1,220,0.06,40,3e-6,0.} 
    76         make/o/t smear_parameters_SC_ParaCrystal = {"scale","Nearest Neighbor (A)","g","Sphere Radius (A)","Contrast (A-2)", "Background (cm-1)"} 
     75        Make/O/D smear_coef_SC_ParaCrystal = {1,220,0.06,40,3e-6,6.3e-6,0.0} 
     76        make/o/t smear_parameters_SC_ParaCrystal = {"scale","Nearest Neighbor (A)","distortion, g","Sphere Radius (A)","SLD sphere (A-2)","SLD solvent (A-2)", "Background (cm-1)"} 
    7777        Edit smear_parameters_SC_ParaCrystal,smear_coef_SC_ParaCrystal                                  //display parameters in a table 
    7878         
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/NewModels_2008/Two_Power_Law_v40.ipf

    r445 r451  
    1111////////////////////////////////// 
    1212Proc PlotTwoPowerLaw(num,qmin,qmax) 
    13         Variable num=512, qmin=.001, qmax=.2 
     13        Variable num=512, qmin=.001, qmax=.7 
    1414        Prompt num "Enter number of data points for model: " 
    1515        Prompt qmin "Enter minimum q-value (^1) for model: "  
  • sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf

    r448 r451  
    121121        SVAR gMenuStr2b = root:Packages:NCNRItemStr2b 
    122122         
    123         String SANSRed_WinList = "Main_Panel;" 
     123        String SANSRed_WinList = "Main_Panel;CatVSTable;" 
    124124        strswitch(itemStr)      // string switch 
    125125                case "Load NCNR SANS Reduction Macros":  
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Correct.ipf

    r418 r451  
    239239        WAVE sam_data=$"root:Packages:NIST:SAM:data" 
    240240        WAVE sam_reals=$"root:Packages:NIST:SAM:realsread" 
    241         WAVE sam_ints=$"rootPackages:NIST::SAM:integersread" 
     241        WAVE sam_ints=$"root:Packages:NIST:SAM:integersread" 
    242242        WAVE/T sam_text=$"root:Packages:NIST:SAM:textread" 
    243243        WAVE bgd_data=$"root:Packages:NIST:BGD:data" 
Note: See TracChangeset for help on using the changeset viewer.