Ignore:
Timestamp:
Oct 23, 2008 5:39:12 PM (14 years ago)
Author:
srkline
Message:

A variety of fixes to make some procedures compatible with the new Packages:NIST subfolder structure

Also, some additional changes to include the proper procedures when loading overall packages

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/FIT_Ops.ipf

    r412 r431  
    147147        tempName = S_path + tempName 
    148148         
    149         //load in the data (into the root directory) 
    150         LoadOneDDataWithName(tempName) 
     149        //load in the data (into the its own folder) 
     150        A_LoadOneDDataWithName(tempName,0) 
    151151        //Print S_fileName 
    152152        //Print tempName 
    153153         
    154         String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0) 
    155  
    156         tempName=cleanLastFileName+"_q" 
    157         Duplicate/O $tempName xAxisWave 
    158         tempName=cleanLastFileName+"_i" 
    159         Duplicate/O $tempName yAxisWave 
    160         tempName=cleanLastFileName+"_s" 
    161         Duplicate/O $tempName yErrWave 
     154        String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 
     155 
     156        tempName="root:"+cleanLastFileName+":"+cleanLastFileName 
     157        Duplicate/O $(tempName+"_q") xAxisWave 
     158        //tempName=cleanLastFileName+"_i" 
     159        Duplicate/O $(tempName+"_i") yAxisWave 
     160        //tempName=cleanLastFileName+"_s" 
     161        Duplicate/O $(tempName+"_s") yErrWave 
    162162 
    163163        //Plot, and adjust the scaling to match the axis scaling set by the popups 
     
    248248        //get the filename from the global as it's loaded, rather from the popup - as version numbers 
    249249        // do cause problems here. This global is also used later in this function 
    250         SVAR gLastFileName = root:myGlobals:gLastFileName 
    251          
    252         Wave xw = $( CleanupName((gLastFileName + "_q"),0) ) 
    253         Wave yw = $( CleanupName((gLastFileName + "_i"),0) ) 
    254         Wave ew = $( CleanupName((gLastFileName + "_s"),0) ) 
     250        SVAR gLastFileName = root:Packages:NIST:gLastFileName 
     251        String tempStr = CleanupName(gLastFileName,0) 
     252        String tempName = "root:"+tempStr+":"+tempStr 
     253         
     254        Wave xw = $(tempName+"_q") 
     255        Wave yw = $(tempName+"_i") 
     256        Wave ew = $(tempName+"_s") 
    255257         
    256258        //variables set for each model to control look of graph 
     
    522524        //ystr and xstr are the axis strings - filter with a do-loop 
    523525        String ystr="",xstr="" 
    524         SVAR gLastFileName = root:myGlobals:gLastFileName 
     526        SVAR gLastFileName = root:Packages:NIST:gLastFileName 
    525527        SVAR aStr = root:myGlobals:gAngstStr 
    526          
     528        String tmpStr = CleanupName(gLastFileName,0) 
    527529        //ControlInfo/W=FitPanel ywave 
    528         Wave xw = $( CleanupName((gLastFileName + "_q"),0) ) 
     530        Wave xw = $("root:"+tmpStr+":"+tmpStr+"_q") 
    529531        ControlInfo/W=FitPanel yModel 
    530532        ystr = S_Value 
     
    841843        String ctrlName 
    842844        // 
    843         String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0) 
    844         String tempName 
    845  
    846         tempName=cleanLastFileName+"_q" 
    847         Duplicate/O $tempName xAxisWave 
    848         tempName=cleanLastFileName+"_i" 
    849         Duplicate/O $tempName yAxisWave 
    850         tempName=cleanLastFileName+"_s" 
    851         Duplicate/O $tempName yErrWave 
    852         Duplicate/O $tempName yWtWave 
    853         Duplicate/O $tempName residWave 
     845        String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 
     846        String tmpStr = "root:"+cleanLastFileName+":"+cleanLastFileName 
     847 
     848        Duplicate/O $(tmpStr+"_q") xAxisWave 
     849        Duplicate/O $(tmpStr+"_i") yAxisWave 
     850        Duplicate/O $(tmpStr+"_s") yErrWave,yWtWave,residWave 
     851 
    854852        yWtWave = 1/yErrWave 
    855853         
     
    10281026         
    10291027        //load in the data (into the root directory) 
    1030         LoadOneDDataWithName(tempName) 
     1028        A_LoadOneDDataWithName(tempName,0) 
    10311029        //Print S_fileName 
    10321030        //Print tempName 
    10331031         
    1034         String cleanLastFileName = "root:"+CleanupName(root:myGlobals:gLastFileName,0) 
    1035  
    1036         tempName=cleanLastFileName+"_q" 
    1037         Duplicate/o $tempName xAxisWave 
    1038         tempName=cleanLastFileName+"_i" 
    1039         Duplicate/o $tempName yAxisWave 
    1040         tempName=cleanLastFileName+"_s" 
    1041         Duplicate/o $tempName yErrWave 
     1032        String cleanLastFileName = CleanupName(root:Packages:NIST:gLastFileName,0) 
     1033        String tmpStr = "root:"+cleanLastFileName+":"+cleanLastFileName 
     1034 
     1035        Duplicate/o $(tmpStr+"_q") xAxisWave 
     1036        Duplicate/o $(tmpStr+"_i") yAxisWave 
     1037        Duplicate/o $(tmpStr+"_s") yErrWave 
     1038         
    10421039        Variable xmin, xmax 
    10431040        WaveStats/Q xAxisWave 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes_v510.ipf

    r429 r431  
    5656#include "MultScatter_MonteCarlo_2D"                    //Oct 2008 SRK for SASCALC simulation 
    5757 
     58#include "PlotManager_v40"                                              //Oct 2008 as part of unifying the loading routines 
     59#include "NIST_XML_v40"                                                 // - creates a cascade of dependencies to load files 
     60#include "cansasXML_v11" 
     61#include "GaussUtils_v40" 
     62#include "USANS_SlitSmearing_v40" 
     63 
    5864// to include the analysis packages, uncomment the following 
    5965// include statement and click "compile" at the bottom of this window. 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MaskUtils.ipf

    r418 r431  
    156156        if(WaveExists($maskPath) == 1) 
    157157                //duplicate the mask, which is named "data" 
    158                 Duplicate/O root:MSK:data root:MSK:overlay 
    159                 Redimension/D root:MSK:overlay 
     158                Duplicate/O root:Packages:NIST:MSK:data root:Packages:NIST:MSK:overlay 
     159                Redimension/D root:Packages:NIST:MSK:overlay 
    160160         
    161161                String tempStr = "root:Packages:NIST:MSK:overlay" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf

    r430 r431  
    227227                  // DONE = 1 
    228228                  // phi and theta are random over the entire sphere of scattering 
     229                  // !can't just choose random theta and phi, won't be random over sphere solid angle 
    229230                         
    230231                        ran = abs(enoise(1))            //[0,1] 
    231                                         theta = pi*ran 
     232                                        theta = acos(2*ran-1)            
    232233                         
    233234                        ran = abs(enoise(1))            //[0,1] 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf

    r430 r431  
    790790        Duplicate/O aveint,$("aveint_"+num2str(ct)) 
    791791        Duplicate/O qval,$("qval_"+num2str(ct)) 
     792        Duplicate/O sigave,$("sigave_"+num2str(ct)) 
    792793        Appendtograph $("aveint_"+num2str(ct)) vs $("qval_"+num2str(ct)) 
    793794        ModifyGraph mode=3 
    794795        ModifyGraph marker=19 
     796        ModifyGraph msize($("aveint_"+num2str(ct)))=2 
     797        ErrorBars/T=0 $("aveint_"+num2str(ct)) Y,wave=($("sigave_"+num2str(ct)),$("sigave_"+num2str(ct))) 
     798         
    795799        switch(mod(ct,10))      // 10 different colors - black is the unfrozen color 
    796800                case 0: 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WorkFileUtils.ipf

    r418 r431  
    985985        //String str = "AAA;BBB;CCC;DDD;EEE;FFF;GGG;" 
    986986        String str = "File_1;File_2;Result;" 
    987         NewDataFolder/O/S root:myGlobals:WorkMath 
     987        NewDataFolder/O/S root:Packages:NIST:WorkMath 
    988988        String/G gFolderList=str 
    989989        Variable ii=0,num=itemsinlist(str) 
     
    10151015 
    10161016        String str1,str2,oper,dest = "Result" 
    1017         String pathStr,workMathStr="myGlobals:WorkMath:" 
     1017        String pathStr,workMathStr="WorkMath:" 
    10181018         
    10191019        //get the panel selections (these are the names of the files on disk) 
     
    10331033 
    10341034        //constants from globals 
    1035         NVAR const1=root:myGlobals:WorkMath:const1 
    1036         NVAR const2=root:myGlobals:WorkMath:const2 
     1035        NVAR const1=root:Packages:NIST:WorkMath:const1 
     1036        NVAR const2=root:Packages:NIST:WorkMath:const2 
    10371037        Printf "(%g)%s %s (%g)%s = %s\r", const1,str1,oper,const2,str2,dest 
    10381038        //check for proper folders (all 3 must be different) 
     
    10421042        Load_NamedASC_File(pathStr+str1,workMathStr+"File_1") 
    10431043         
    1044         NVAR pixelsX = root:myGlobals:gNPixelsX 
     1044        NVAR pixelsX = root:myGlobals:gNPixelsX         //OK, location is correct 
    10451045        NVAR pixelsY = root:myGlobals:gNPixelsY 
    10461046         
    10471047        WAVE/Z data1=$("root:Packages:NIST:"+workMathStr+"File_1:data") 
    10481048        If(cmpstr(str2,"UNIT MATRIX")==0) 
    1049                 Make/O/N=(pixelsX,pixelsY) root:myGlobals:WorkMath:data         //don't put in File_2 folder 
    1050                 Wave/Z data2 =  root:myGlobals:WorkMath:data                    //it's not real data! 
     1049                Make/O/N=(pixelsX,pixelsY) root:Packages:NIST:WorkMath:data             //don't put in File_2 folder 
     1050                Wave/Z data2 =  root:Packages:NIST:WorkMath:data                        //it's not real data! 
    10511051                data2=1 
    10521052        else 
     
    11001100        //wipe out the data folder of globals 
    11011101        SVAR dataType=root:myGlobals:gDataDisplayType 
    1102         if(strsearch(dataType, "myGlobals", 0 ) != -1)          //kill the SANS_Data graph if needed 
     1102        if(strsearch(dataType, "WorkMath", 0 ) != -1)           //kill the SANS_Data graph if needed 
    11031103                DoWindow/K SANS_Data 
    11041104        Endif 
    1105         KillDataFolder root:myGlobals:WorkMath 
     1105        KillDataFolder root:Packages:NIST:WorkMath 
    11061106End 
    11071107 
     
    11141114         
    11151115        String destStr="" 
    1116         SVAR folderList=root:myGlobals:WorkMath:gFolderList 
     1116        SVAR folderList=root:Packages:NIST:WorkMath:gFolderList 
    11171117        Prompt destStr,"Select the destination folder",popup,folderList 
    11181118        DoPrompt "Folder for ASC Load",destStr 
     
    11221122        Endif 
    11231123         
    1124         String destFolder = "myGlobals:WorkMath:"+destStr 
     1124        String destFolder = "WorkMath:"+destStr 
    11251125         
    11261126        Load_ASC_File("Pick the ASC file",destFolder) 
     
    11391139        String popStr 
    11401140         
    1141         String folder="myGlobals:WorkMath:",pathStr,str1 
     1141        String folder="WorkMath:",pathStr,str1 
    11421142 
    11431143        PathInfo catPathName 
     
    11921192        Button button3,help={"Show help file for math operations on 2-D data sets"} 
    11931193        SetVariable setvar0,pos={9,46},size={70,15},title=" " 
    1194         SetVariable setvar0,limits={-Inf,Inf,0},value= root:myGlobals:WorkMath:const1 
     1194        SetVariable setvar0,limits={-Inf,Inf,0},value= root:Packages:NIST:WorkMath:const1 
    11951195        SetVariable setvar0,help={"Multiplicative constant for the first dataset"} 
    11961196        PopupMenu popup0,pos={89,44},size={84,20},title="X  " 
     
    12041204        PopupMenu popup2,help={"Selects the mathematical operator"} 
    12051205        SetVariable setvar1,pos={13,139},size={70,15},title=" " 
    1206         SetVariable setvar1,limits={-Inf,Inf,0},value= root:myGlobals:WorkMath:const2 
     1206        SetVariable setvar1,limits={-Inf,Inf,0},value= root:Packages:NIST:WorkMath:const2 
    12071207        SetVariable setvar1,help={"Multiplicative constant for the second dataset"} 
    12081208//      PopupMenu popup3,pos={27,167},size={124,20},title=" = Destination" 
    1209 //      PopupMenu popup3,mode=1,popvalue="Destination",value= root:myGlobals:WorkMath:gFolderList 
     1209//      PopupMenu popup3,mode=1,popvalue="Destination",value= root:Packages:NIST:WorkMath:gFolderList 
    12101210//      PopupMenu popup3,help={"Selects the destination folder"} 
    12111211        PopupMenu popup4,pos={55,204},size={103,20},proc=WorkMath_Display_PopMenuProc,title="Display" 
     
    12401240//fileStr must be the FULL path and filename on disk 
    12411241//destFolder is the path to the Igor folder where the data is to be deposited 
    1242 // - "myGlobals:WorkMath:File_1" for example, compatible with SANS_Data display type 
     1242// - "Packages:NIST:WorkMath:File_1" for example, compatible with SANS_Data display type 
    12431243// 
    12441244Function Load_NamedASC_File(fileStr,destFolder) 
Note: See TracChangeset for help on using the changeset viewer.