Ignore:
Timestamp:
Apr 15, 2016 4:31:14 PM (7 years ago)
Author:
srkline
Message:

removed the doubled "entry" field from the VSANS file load.

appears now to work fine with R/W routines and with VCALC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_RW_Utils.ipf

    r991 r992  
    5353 
    5454        if(cmpstr(folder,"RAW")==0) 
    55                 base_name="entry" 
    56 //              base_name="RAW"         // this acts as a flag to remove the duplicate "entry" level 
     55//              base_name="entry" 
     56                base_name="RAW"         // this acts as a flag to remove the duplicate "entry" level 
    5757        else 
    5858        // null will use the file name as the top level (above entry) 
     
    6666        // then do any "massaging" needed to redimension, fake values, etc. 
    6767        // 
    68         string tmpStr = "root:Packages:NIST:VSANS:RAW:entry:entry:instrument:"  
     68        string tmpStr = "root:Packages:NIST:VSANS:RAW:entry:instrument:"  
    6969 
    7070        if(cmpstr(folder,"RAW")==0) 
     
    158158         
    159159        // check for fake data in VCALC folder... 
    160         wave/Z tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_B:det_B" 
     160        wave/Z tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_B:det_B" 
    161161        if(WaveExists(tmpw) == 0) 
    162162                Execute "VCALC_Panel()" 
    163163        endif 
    164164         
    165         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_B 
     165        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_B 
    166166        Wave det_B=data 
    167167//      Redimension/N=(150,150)/E=1 det_B        
    168168        Redimension/D det_B 
    169         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_B:det_B" 
     169        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_B:det_B" 
    170170//      det_B=tmpw 
    171171//      det_B += 2 
     
    175175                         
    176176        Variable ctr=20,npix=128 
    177         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_MT 
     177        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_MT 
    178178        Wave det_MT=data 
    179179//      Redimension/N=(npix,48)/E=1 det_MT 
     
    183183//      det_MT *= 10 
    184184//      det_MT += 2 
    185         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_MT:det_MT" 
     185        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_MT:det_MT" 
    186186//      det_MT=tmpw 
    187187//      det_MT += 2 
     
    190190 
    191191         
    192         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_MB 
     192        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_MB 
    193193        Wave det_MB=data 
    194194//      Redimension/N=(npix,48)/E=1 det_MB               
     
    198198//      det_MB *= 5 
    199199//      det_MB += 2 
    200         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_MB:det_MB" 
     200        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_MB:det_MB" 
    201201//      det_MB=tmpw 
    202202//      det_MB += 2 
     
    206206         
    207207        ctr=30 
    208         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_ML 
     208        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_ML 
    209209        Wave det_ML=data 
    210210//      Redimension/N=(48,npix)/E=1 det_ML               
     
    214214//      det_ML *= 2 
    215215//      det_ML += 2 
    216         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_ML:det_ML" 
     216        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_ML:det_ML" 
    217217//      det_ML=tmpw 
    218218//      det_ML += 2 
     
    221221 
    222222                 
    223         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_MR 
     223        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_MR 
    224224        Wave det_MR=data 
    225225//      Redimension/N=(48,npix)/E=1 det_MR               
     
    228228        SetScale/I y -npix/2,npix/2,"",det_MR 
    229229//      det_MR +=2 
    230         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_MR:det_MR" 
     230        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_MR:det_MR" 
    231231//      det_MR=tmpw 
    232232//      det_MR += 2 
     
    236236         
    237237        ctr=30 
    238         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_FT 
     238        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FT 
    239239        Wave det_FT=data 
    240240//      Redimension/N=(npix,48)/E=1 det_FT               
     
    242242        SetScale/I x -npix/2,npix/2,"",det_FT 
    243243        SetScale/I y ctr,ctr+48,"",det_FT 
    244         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_FT:det_FT" 
     244        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_FT:det_FT" 
    245245//      det_FT=tmpw 
    246246        Wave distance=distance 
     
    248248 
    249249 
    250         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_FB 
     250        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FB 
    251251        Wave det_FB=data 
    252252//      Redimension/N=(npix,48)/E=1 det_FB               
     
    254254        SetScale/I x -npix/2,npix/2,"",det_FB 
    255255        SetScale/I y -ctr-48,-ctr,"",det_FB 
    256         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_FB:det_FB" 
     256        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_FB:det_FB" 
    257257//      det_FB=tmpw 
    258258        Wave distance=distance 
     
    260260 
    261261                         
    262         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_FL 
     262        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FL 
    263263        Wave det_FL=data 
    264264//      Redimension/N=(48,npix)/E=1 det_FL               
     
    266266        SetScale/I x -ctr-48,-ctr,"",det_FL 
    267267        SetScale/I y -npix/2,npix/2,"",det_FL 
    268         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_FL:det_FL" 
     268        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_FL:det_FL" 
    269269//      det_FL=tmpw 
    270270        Wave distance=distance 
     
    272272 
    273273         
    274         SetDataFolder root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_FR 
     274        SetDataFolder root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FR 
    275275        Wave det_FR=data 
    276276//      Redimension/N=(48,npix)/E=1 det_FR               
     
    278278        SetScale/I x ctr,ctr+48,"",det_FR 
    279279        SetScale/I y -npix/2,npix/2,"",det_FR 
    280         wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_FR:det_FR" 
     280        wave tmpw=$"root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_FR:det_FR" 
    281281//      det_FR=tmpw 
    282282        Wave distance=distance 
     
    421421// currently, the work folders have the following path - so passing in "RAW" as fname 
    422422// will take some re-configuring.  
    423 //  root:Packages:NIST:VSANS:RAW:entry:entry:instrument:detector_FL:distance 
     423//  root:Packages:NIST:VSANS:RAW:entry:instrument:detector_FL:distance 
    424424// -- be sure this read from work folders is not broken in the future, and is passed to ALL of the 
    425425//    top-level R/W routines. (Write is necessary ONLY for SIM data files. Patch is direct to disk.) 
     
    432432        folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    433433 
    434 // check for a work folder first (note that "entry" is doubled) 
    435         if(Exists("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path)) 
    436                 Wave/Z w = $("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path) 
     434// check for a work folder first (note that "entry" is now NOT doubled) 
     435        if(Exists("root:Packages:NIST:VSANS:"+folderStr+":"+path)) 
     436                Wave/Z w = $("root:Packages:NIST:VSANS:"+folderStr+":"+path) 
    437437                return(w[0]) 
    438438        endif 
     
    477477        folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    478478 
    479 // check for a work folder first (note that "entry" is doubled) 
    480         if(Exists("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path)) 
    481                 Wave wOut = $("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path) 
     479// check for a work folder first (note that "entry" is NOT doubled) 
     480        if(Exists("root:Packages:NIST:VSANS:"+folderStr+":"+path)) 
     481                Wave wOut = $("root:Packages:NIST:VSANS:"+folderStr+":"+path) 
    482482                return wOut 
    483483        endif 
     
    519519        folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    520520 
    521 // check for a work folder first (note that "entry" is doubled) 
    522         if(Exists("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path)) 
    523                 Wave/T wOut = $("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path) 
     521// check for a work folder first (note that "entry" is NOT doubled) 
     522        if(Exists("root:Packages:NIST:VSANS:"+folderStr+":"+path)) 
     523                Wave/T wOut = $("root:Packages:NIST:VSANS:"+folderStr+":"+path) 
    524524                return wOut 
    525525        endif 
     
    589589        folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    590590 
    591 // check for a work folder first (note that "entry" is doubled) 
    592         if(Exists("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path)) 
    593                 Wave/Z/T tw = $("root:Packages:NIST:VSANS:"+folderStr+":entry:"+path) 
     591// check for a work folder first (note that "entry" is NOT doubled) 
     592        if(Exists("root:Packages:NIST:VSANS:"+folderStr+":"+path)) 
     593                Wave/Z/T tw = $("root:Packages:NIST:VSANS:"+folderStr+":"+path) 
    594594                return(tw[0]) 
    595595        endif 
     
    652652        String folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    653653         
    654         String localPath = "root:Packages:NIST:VSANS:"+folderStr+":entry" 
     654        String localPath = "root:Packages:NIST:VSANS:"+folderStr//+":entry" 
    655655        localPath += groupName + "/" + varName 
    656656        // make everything colons for local data folders 
     
    758758        String folderStr = V_RemoveDotExtension(V_GetFileNameFromPathNoSemi(fname)) 
    759759         
    760         String localPath = "root:Packages:NIST:VSANS:"+folderStr+":entry" 
     760        String localPath = "root:Packages:NIST:VSANS:"+folderStr//+":entry" 
    761761        localPath += groupName + "/" + varName 
    762762        // make everything colons for local data folders 
     
    892892        for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 
    893893                detStr = StringFromList(ii, ksDetectorListAll, ";") 
    894                 Duplicate/O $("root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_"+detStr+":det_"+detStr) tmpData 
     894                Duplicate/O $("root:Packages:NIST:VSANS:VCALC:entry:instrument:detector_"+detStr+":det_"+detStr) tmpData 
    895895                Redimension/I tmpData 
    896896                tmpData = (tmpData ==   2147483647) ? 0 : tmpData               //the NaN "mask" in the sim data (T/B only)shows up as an ugly integer 
Note: See TracChangeset for help on using the changeset viewer.