Ignore:
Timestamp:
Oct 7, 2008 1:09:04 PM (14 years ago)
Author:
ajj
Message:

Moving data folders into root:Packages:NIST

This could be hairy.

File:
1 edited

Legend:

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

    r412 r418  
    2121//reads the data (1=mask, 0 = no mask) 
    2222//and plots a quickie image to make sure it's ok 
    23 //data is always read into root:MSK folder 
     23//data is always read into root:Packages:NIST:MSK folder 
    2424// 
    2525Proc ReadMASK() 
    2626         
    27         //SetDataFolder root:MSK 
     27        //SetDataFolder root:Packages:NIST:MSK 
    2828        String fname = PromptForPath("Select Mask file") 
    2929        if(strlen(fname)==0) 
     
    3232        ReadMCID_MASK(fname) 
    3333         
    34         //SetDataFolder root:MSK 
     34        //SetDataFolder root:Packages:NIST:MSK 
    3535////    SRK SEP06 disable plot of mask data, just show the overlay 
    36 ////    String waveStr = "root:MSK:data" 
     36////    String waveStr = "root:Packages:NIST:MSK:data" 
    3737////    NewImage/F/S=2/K=1 $waveStr 
    3838////    ModifyImage '' ctab= {*,*,YellowHot,0} 
     
    4545 
    4646 
    47 //reads the mask data into the root:MSK folder 
     47//reads the mask data into the root:Packages:NIST:MSK folder 
    4848//setDataFolder is required here 
    4949//y-values must be flipped to get proper array assignment of the mask 
     
    5656        NVAR pixelsX = root:myGlobals:gNPixelsX 
    5757        NVAR pixelsY = root:myGlobals:gNPixelsY 
    58         SetDataFolder root:MSK 
     58        SetDataFolder root:Packages:NIST:MSK 
    5959        Killwaves/Z data,data0          //kill the old data, if it exists 
    6060        String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/U=16384 /Q  \"" + fname +"\"" 
    6161        Execute cmd  
    62         SetDataFolder root:MSK                                          //make sure correct data folder is set 
    63         WAVE data0 = $"root:MSK:data0" 
     62        SetDataFolder root:Packages:NIST:MSK                                            //make sure correct data folder is set 
     63        WAVE data0 = $"root:Packages:NIST:MSK:data0" 
    6464        Redimension/N=(pixelsX,pixelsY) data0 
    6565        Flip_Y(data0) 
    6666         
    67         SetDataFolder root:MSK 
     67        SetDataFolder root:Packages:NIST:MSK 
    6868        Rename data0,data 
    6969         
    70         Variable/G root:MSK:gIsLogScale = 0 
    71         String/G root:MSK:fileList = GetFileNameFromPathNoSemi(fname) 
     70        Variable/G root:Packages:NIST:MSK:gIsLogScale = 0 
     71        String/G root:Packages:NIST:MSK:fileList = GetFileNameFromPathNoSemi(fname) 
    7272        //back to root folder 
    7373        SetDataFolder root: 
     
    153153        Variable state 
    154154         
    155         String maskPath = "root:MSK:data" 
     155        String maskPath = "root:Packages:NIST:MSK:data" 
    156156        if(WaveExists($maskPath) == 1) 
    157157                //duplicate the mask, which is named "data" 
     
    159159                Redimension/D root:MSK:overlay 
    160160         
    161                 String tempStr = "root:MSK:overlay" 
     161                String tempStr = "root:Packages:NIST:MSK:overlay" 
    162162                ResetLoop(tempStr)              //keeps 1's and sets 0's to NaN 
    163163         
     
    168168                endif 
    169169                 
    170                 CheckDisplayed/W=SANS_Data root:MSK:overlay 
     170                CheckDisplayed/W=SANS_Data root:Packages:NIST:MSK:overlay 
    171171                //Print "V_flag = ",V_flag 
    172172         
     
    178178                        if(state==1) 
    179179                                //append the new overlay 
    180                                 AppendImage/L=left/B=bottom root:MSK:overlay 
     180                                AppendImage/L=left/B=bottom root:Packages:NIST:MSK:overlay 
    181181                                //set the color table to vary from 0 to * (=max data = 1), with blue maximum 
    182182                                //Nan's will appear transparent (just a general feature of images) 
     
    296296        //there must be data in root:curDispType:data FIRST 
    297297        SVAR curType=root:myGlobals:gDataDisplayType 
    298         if(WaveExists($("root:"+curType+":data") )) 
     298        if(WaveExists($("root:Packages:NIST:"+curType+":data") )) 
    299299                DoWindow/F drawMaskWin 
    300300                If(V_flag == 0) 
     
    319319                //create the data folder and the globals 
    320320                                NewDataFolder/O root:myGlobals:drawMask 
    321                                 Duplicate/O $("root:"+type+":data") root:myGlobals:drawMask:data                //copy of the data 
     321                                Duplicate/O $("root:Packages:NIST:"+type+":data") root:myGlobals:drawMask:data          //copy of the data 
    322322                Endif 
    323323                //if the data folder's there , then the globals must also be there so don't do anything 
Note: See TracChangeset for help on using the changeset viewer.