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/NCNR_DataReadWrite.ipf

    r412 r418  
    5959//VAX record markers are skipped as needed 
    6060//VAX data as read in is in compressed I*2 format, and is decompressed 
    61 //immediately after being read in. The final root:RAW:data wave is the real 
     61//immediately after being read in. The final root:Packages:NIST:RAW:data wave is the real 
    6262//neutron counts and can be directly operated on 
    6363// 
     
    7878        String fname 
    7979        //this function is for reading in RAW data only, so it will always put data in RAW folder 
    80         String curPath = "root:RAW" 
     80        String curPath = "root:Packages:NIST:RAW" 
    8181        SetDataFolder curPath           //use the full path, so it will always work 
    8282        Variable/G root:RAW:gIsLogScale = 0             //initial state is linear, keep this in RAW folder 
     
    8585        String sansfname,textstr 
    8686         
    87         Make/O/N=23 $"root:RAW:IntegersRead" 
    88         Make/O/N=52 $"root:RAW:RealsRead" 
    89         Make/O/T/N=11 $"root:RAW:TextRead" 
    90          
    91         Wave intw=$"root:RAW:IntegersRead" 
    92         Wave realw=$"root:RAW:RealsRead" 
    93         Wave/T textw=$"root:RAW:TextRead" 
     87        Make/O/N=23 $"root:Packages:NIST:RAW:IntegersRead" 
     88        Make/O/N=52 $"root:Packages:NIST:RAW:RealsRead" 
     89        Make/O/T/N=11 $"root:Packages:NIST:RAW:TextRead" 
     90         
     91        Wave intw=$"root:Packages:NIST:RAW:IntegersRead" 
     92        Wave realw=$"root:Packages:NIST:RAW:RealsRead" 
     93        Wave/T textw=$"root:Packages:NIST:RAW:TextRead" 
    9494         
    9595        //***NOTE **** 
     
    228228        strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + fname + "\"" 
    229229        Execute strToExecute 
    230         Wave w=$"root:RAW:tempGBWave0" 
     230        Wave w=$"root:Packages:NIST:RAW:tempGBWave0" 
    231231        b=4     //num of reals read 
    232232        realw[a,a+b-1] = w[p-a] 
     
    334334        SetDataFolder curPath           //use the full path, so it will always work 
    335335         
    336         Make/O/N=16384 $"root:RAW:data" 
    337         WAVE data=$"root:RAW:data" 
     336        Make/O/N=16384 $"root:Packages:NIST:RAW:data" 
     337        WAVE data=$"root:Packages:NIST:RAW:data" 
    338338        SkipAndDecompressVAX(w,data) 
    339339        Redimension/N=(128,128) data                    //NIST raw data is 128x128 - do not generalize 
    340340         
    341341        //keep a string with the filename in the RAW folder 
    342         String/G root:RAW:fileList = textw[0] 
     342        String/G root:Packages:NIST:RAW:fileList = textw[0] 
    343343         
    344344        //set the globals to the detector dimensions (pixels) 
     
    350350//      endif 
    351351         
    352         //clean up - get rid of w = $"root:RAW:tempGBWave0" 
     352        //clean up - get rid of w = $"root:Packages:NIST:RAW:tempGBWave0" 
    353353        KillWaves/Z w 
    354354         
     
    428428//main entry procedure for reading a "WORK.DIV" file 
    429429//displays a quick image of the  file, to check that it's correct 
    430 //data is deposited in root:DIV data folder 
     430//data is deposited in root:Packages:NIST:DIV data folder 
    431431// 
    432432// local, currently unused 
     
    439439        ReadHeaderAndWork("DIV",fname)          //puts what is read in work.div 
    440440         
    441         String waveStr = "root:DIV:data" 
     441        String waveStr = "root:Packages:NIST:DIV:data" 
    442442        NewImage/F/K=1/S=2 $waveStr             //this is an experimental IGOR operation 
    443443        ModifyImage '' ctab= {*,*,YellowHot,0} 
     
    445445         
    446446        //change the title string to WORK.DIV, rather than PLEXnnn_TST_asdfa garbage 
    447         String/G root:DIV:fileList = "WORK.DIV" 
     447        String/G root:Packages:NIST:DIV:fileList = "WORK.DIV" 
    448448         
    449449        SetDataFolder root:             //(redundant) 
     
    474474//      SVAR cur_folder=root:myGlobals:gDataDisplayType 
    475475        String cur_folder = type 
    476         String curPath = "root:"+cur_folder 
     476        String curPath = "root:Packages:NIST:"+cur_folder 
    477477        SetDataFolder curPath           //use the full path, so it will always work 
    478478         
     
    728728         GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
    729729 
    730         curPath = "root:"+cur_folder 
     730        curPath = "root:Packages:NIST:"+cur_folder 
    731731        SetDataFolder curPath           //use the full path, so it will always work 
    732732         
     
    828828        String fname, destPath 
    829829        //this function is for reading in ASCII data so put data in user-specified folder 
    830         SetDataFolder "root:"+destPath 
     830        SetDataFolder "root:Packages:NIST:"+destPath 
    831831 
    832832        NVAR pixelsX = root:myGlobals:gNPixelsX 
     
    890890Function FillFakeHeader_ASC(destFolder) 
    891891        String destFolder 
    892         Make/O/N=23 $("root:"+destFolder+":IntegersRead") 
    893         Make/O/N=52 $("root:"+destFolder+":RealsRead") 
    894         Make/O/T/N=11 $("root:"+destFolder+":TextRead") 
    895          
    896         Wave intw=$("root:"+destFolder+":IntegersRead") 
    897         Wave realw=$("root:"+destFolder+":RealsRead") 
    898         Wave/T textw=$("root:"+destFolder+":TextRead") 
     892        Make/O/N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead") 
     893        Make/O/N=52 $("root:Packages:NIST:"+destFolder+":RealsRead") 
     894        Make/O/T/N=11 $("root:Packages:NIST:"+destFolder+":TextRead") 
     895         
     896        Wave intw=$("root:Packages:NIST:"+destFolder+":IntegersRead") 
     897        Wave realw=$("root:Packages:NIST:"+destFolder+":RealsRead") 
     898        Wave/T textw=$("root:Packages:NIST:"+destFolder+":TextRead") 
    899899         
    900900        //Put in appropriate "fake" values 
    901901        //parse values as needed from headerLines 
    902         Wave/T hdr=$("root:"+destFolder+":hdrLines") 
     902        Wave/T hdr=$("root:Packages:NIST:"+destFolder+":hdrLines") 
    903903        Variable monCt,lam,offset,sdd,trans,thick 
    904904        Variable xCtr,yCtr,a1,a2,a1a2Dist,dlam,bsDiam 
     
    951951//      Print tempStr 
    952952//      Print junkStr 
    953         String/G $("root:"+destFolder+":fileList") = tempStr 
     953        String/G $("root:Packages:NIST:"+destFolder+":fileList") = tempStr 
    954954        textw[0] = tempStr              //filename 
    955955        textw[1] = junkStr              //run date-time 
Note: See TracChangeset for help on using the changeset viewer.