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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.