Ignore:
Timestamp:
Aug 12, 2015 12:04:50 PM (7 years ago)
Author:
srkline
Message:

more work with SANS and VSANS Nexus files, still trying to organize the r/w routines for just the basic testing of the first pass of NICE-generated files. Ditched the idea of generating the files from Igor, since DAS_log is not included. Now the plan is to start from a NICE/Nexus template. All still EXTREMELY fluid at this point.

File:
1 edited

Legend:

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

    r955 r960  
    397397//@- 
    398398 
    399 Function/T H5GW_ReadHDF5(parentFolder, fileName, [hdf5Path]) 
     399Function/S H5GW_ReadHDF5(parentFolder, fileName, [hdf5Path]) 
    400400        String parentFolder, fileName, hdf5Path 
    401401        if ( ParamIsDefault(hdf5Path) ) 
     
    414414                return parentFolder + " (Igor folder) not found" 
    415415        endif 
    416          
     416 
     417 
    417418        // do the work here: 
    418419        Variable/G fileID = H5GW__OpenHDF5_RO(fileName) 
     
    420421                return fileName + ": could not open as HDF5 file" 
    421422        endif 
     423         
     424s_tic()         //fast  
    422425         
    423426        SVAR tmpStr=root:file_name 
     
    431434                return fileName + ": problem while opening HDF5 file" 
    432435        endif 
     436 
     437s_toc() 
     438         
     439//s_tic()               // this is the slow part, 0.7s for Igor-generated. > 9s for NICE (which has DAS_log) 
     440 
    433441        String/G objectPaths = S_objectPaths  // this gives a clue to renamed datasets (see below for attributes) 
    434442        //   read the attributes 
     
    444452        Note $file_info, "file_path="+file_path 
    445453 
    446         KillStrings/Z file_path, file_name, objectPaths, group_name_list, dataset_name_list 
     454        KillStrings/Z file_path, objectPaths, group_name_list, dataset_name_list // ,file_name 
    447455        KillVariables/Z fileID 
     456 
     457//s_toc() 
    448458         
    449459        SetDataFolder $oldFolder 
     
    834844                file_infoT[ii][Igor_col] = StringFromList(1, item, keySep) 
    835845        endfor 
     846 
    836847End 
    837848 
     
    9981009        Variable dataset_attributes_type = 2 
    9991010         
     1011//s_tic()       // 0.11 s 
    10001012        // read and assign group attributes 
    10011013        String S_HDF5ListGroup 
     
    10241036                SetDataFolder $old_dir 
    10251037        endfor 
     1038 
     1039//s_toc() 
     1040//s_tic()       // 3.2 s !! 
    10261041         
    10271042        // read and assign dataset attributes 
     
    10381053        sprintf file_info, ":%s:HDF5___xref", baseName 
    10391054        Wave/T xref = $file_info 
     1055 
     1056//s_toc() 
     1057//s_tic()       // worst @ 6.3 s 
    10401058 
    10411059        Variable row 
     
    10551073                endif 
    10561074        endfor 
     1075//s_toc() 
    10571076 
    10581077End 
Note: See TracChangeset for help on using the changeset viewer.