Ignore:
Timestamp:
Oct 16, 2009 2:24:50 PM (13 years ago)
Author:
srkline
Message:

Merging changes of NCNR_ in to the ILL_ files. This is mostly the :Packages:NIST: data folder structure that is new since Lionel made his changes.

Removed Lionel's InitializeILL file, and moved his specific changes (just some global variables) to the initialization routine in ILL_Utils, where it belongs.

File:
1 edited

Legend:

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

    r572 r573  
    7373        String fname 
    7474        //this function is for reading in RAW data only, so it will always put data in RAW folder 
    75         String curPath = "root:RAW" 
     75        String curPath = "root:Packages:NIST:RAW:" 
    7676        SetDataFolder curPath           //use the full path, so it will always work 
    77         Variable/G root:RAW:gIsLogScale = 0             //initial state is linear, keep this in RAW folder 
     77        Variable/G root:Packages:NIST:RAW:gIsLogScale = 0               //initial state is linear, keep this in RAW folder 
    7878         
    7979        Variable refNum,integer,realval,ii 
    8080        String sansfname,textstr,v0 
    8181         
    82         Make/D/O/N=23 $"root:RAW:IntegersRead" 
    83         Make/D/O/N=52 $"root:RAW:RealsRead" 
    84         Make/O/T/N=11 $"root:RAW:TextRead" 
    85          
    86         Wave intw=$"root:RAW:IntegersRead" 
    87         Wave realw=$"root:RAW:RealsRead" 
    88         Wave/T textw=$"root:RAW:TextRead" 
     82        Make/O/D/N=23 $"root:Packages:NIST:RAW:IntegersRead" 
     83        Make/O/D/N=52 $"root:Packages:NIST:RAW:RealsRead" 
     84        Make/O/T/N=11 $"root:Packages:NIST:RAW:TextRead" 
     85        Make/O/N=7 $"root:Packages:NIST:RAW:LogicalsRead" 
     86         
     87        Wave intw=$"root:Packages:NIST:RAW:IntegersRead" 
     88        Wave realw=$"root:Packages:NIST:RAW:RealsRead" 
     89        Wave/T textw=$"root:Packages:NIST:RAW:TextRead" 
     90        Wave logw=$"root:Packages:NIST:RAW:LogicalsRead" 
    8991         
    9092        // FILL IN 3 ARRAYS WITH HEADER INFORMATION FOR LATER USE 
     
    204206        SetDataFolder curPath 
    205207         
    206         Make/D/O/N=(XPix,YPix) $"root:RAW:data" 
    207         WAVE data=$"root:RAW:data" 
     208        Make/D/O/N=(XPix,YPix) $"root:Packages:NIST:RAW:data" 
     209        WAVE data=$"root:Packages:NIST:RAW:data" 
    208210 
    209211        // fill the data array with the detector values 
     
    214216         
    215217        //keep a string with the filename in the RAW folder 
    216         String/G root:RAW:fileList = textw[0] 
     218        String/G root:Packages:NIST:RAW:fileList = textw[0] 
    217219         
    218220        Setdatafolder root: 
     
    235237        ReadHeaderAndWork("DIV",fname)          //puts what is read in work.div 
    236238         
    237         String waveStr = "root:DIV:data" 
     239        String waveStr = "root:Packages:NIST:DIV:data" 
    238240        NewImage/F/K=1/S=2 $waveStr 
    239241        ModifyImage '' ctab= {*,*,YellowHot,0} 
    240242         
    241         String/G root:DIV:fileList = "WORK.DIV" 
     243        String/G root:Packages:NIST:DIV:fileList = "WORK.DIV" 
    242244         
    243245        SetDataFolder root:             //(redundant) 
     
    267269 
    268270        String cur_folder = type 
    269         String curPath = "root:"+cur_folder 
     271        String curPath = "root:Packages:NIST:"+cur_folder 
    270272        SetDataFolder curPath           //use the full path, so it will always work 
    271273         
     
    299301        // fill in your reader for the header here so that intw, realw, and textW are filled in 
    300302        // ? possibly a duplication of the raw data reader 
    301         Duplicate/O $("root:raw:realsread"),$("curPath"+ ":realsread") 
    302         Duplicate/O $("root:raw:integersread"),$("curPath"+ ":integersread") 
    303         Duplicate/T $("root:raw:Textread"),$("curPath"+ ":Textread") 
     303        Duplicate/O $("root:Packages:NIST:raw:realsread"),$(curPath+ ":realsread") 
     304        Duplicate/O $("root:Packages:NIST:raw:integersread"),$(curPath+ ":integersread") 
     305        Duplicate/T $("root:Packages:NIST:raw:Textread"),$(curPath+ ":Textread") 
    304306         
    305307 
     
    309311        // fill the data array with the detector values 
    310312 
    311         duplicate/O $("root:raw:data"),$("curPath"+ ":data") 
     313        duplicate/O $("root:Packages:NIST:raw:data"),$(curPath+ ":data") 
    312314         
    313315         
     
    332334//      SVAR cur_folder=root:myGlobals:gDataDisplayType 
    333335        String cur_folder = type 
    334         String curPath = "root:"+cur_folder 
     336        String curPath = "root:Packages:NIST:"+cur_folder 
    335337        SetDataFolder curPath           //use the full path, so it will always work 
    336338         
     
    586588         GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
    587589 
    588         curPath = "root:"+cur_folder 
     590        curPath = "root:Packages:NIST:"+cur_folder 
    589591        SetDataFolder curPath           //use the full path, so it will always work 
    590592         
     
    694696        String fname, destPath 
    695697        //this function is for reading in ASCII data so put data in user-specified folder 
    696         SetDataFolder "root:"+destPath 
     698        SetDataFolder "root:Packages:NIST:"+destPath 
    697699 
    698700        NVAR pixelsX = root:myGlobals:gNPixelsX 
     
    763765Function FillFakeHeader_ASC(destFolder) 
    764766        String destFolder 
    765         Make/O/N=23 $("root:"+destFolder+":IntegersRead") 
    766         Make/O/N=52 $("root:"+destFolder+":RealsRead") 
    767         Make/O/T/N=11 $("root:"+destFolder+":TextRead") 
    768          
    769         Wave intw=$("root:"+destFolder+":IntegersRead") 
    770         Wave realw=$("root:"+destFolder+":RealsRead") 
    771         Wave/T textw=$("root:"+destFolder+":TextRead") 
     767        Make/O/D/N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead") 
     768        Make/O/D/N=52 $("root:Packages:NIST:"+destFolder+":RealsRead") 
     769        Make/O/T/N=11 $("root:Packages:NIST:"+destFolder+":TextRead") 
     770         
     771        Wave intw=$("root:Packages:NIST:"+destFolder+":IntegersRead") 
     772        Wave realw=$("root:Packages:NIST:"+destFolder+":RealsRead") 
     773        Wave/T textw=$("root:Packages:NIST:"+destFolder+":TextRead") 
    772774         
    773775        //Put in appropriate "fake" values 
    774776        //parse values as needed from headerLines 
    775         Wave/T hdr=$("root:"+destFolder+":hdrLines") 
     777        Wave/T hdr=$("root:Packages:NIST:"+destFolder+":hdrLines") 
    776778        Variable monCt,lam,offset,sdd,trans,thick 
    777779        Variable xCtr,yCtr,a1,a2,a1a2Dist,dlam,bsDiam 
     
    824826//      Print tempStr 
    825827//      Print junkStr 
    826         String/G $("root:"+destFolder+":fileList") = tempStr 
     828        String/G $("root:Packages:NIST:"+destFolder+":fileList") = tempStr 
    827829        textw[0] = tempStr              //filename 
    828830        textw[1] = junkStr              //run date-time 
Note: See TracChangeset for help on using the changeset viewer.