Ignore:
Timestamp:
Jan 17, 2017 8:37:19 AM (6 years ago)
Author:
srkline
Message:

adding procedures for:

simple save of a DIV file. no functionality to generate a DIV file yet, since I don't know how this will happen.

Simple dump of the file structure in a data "tree"

Verified that the error bars on the I(q) data are correctly calculated as standard error of the mean. There was never an issue with this, or with SANS calculations.

Started filling in "Correct" routines based on the SANS version. Only stubs present currently.

File:
1 edited

Legend:

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

    r985 r1019  
    32783278 
    32793279 
     3280 
     3281 
     3282 
     3283////////// 
     3284// 
     3285// These procedures are needed to write out MASK and DIV files 
     3286// 
     3287//////// 
     3288 
     3289 
     3290// 
     3291// saves a specified folder, with a given filename. 
     3292// saves to the home path 
     3293// 
     3294Proc Save_VSANS_file(dfPath, filename) 
     3295        String dfPath   ="root:VSANS_file"              // e.g., "root:FolderA" or ":" 
     3296        String filename = "Test_VSANS_file.h5" 
     3297         
     3298        H_NXSANS_SaveGroupAsHDF5(dfPath, filename) 
     3299End 
     3300 
     3301 
     3302//       
     3303// this is my procedure to save the folders to HDF5, once I've filled the folder tree 
     3304// 
     3305// this does NOT save attributes, but gets the folder structure correct 
     3306// 
     3307Function H_NXSANS_SaveGroupAsHDF5(dfPath, filename) 
     3308        String dfPath   // e.g., "root:FolderA" or ":" 
     3309        String filename 
     3310 
     3311        Variable result = 0     // 0 means no error 
     3312         
     3313        Variable fileID 
     3314        HDF5CreateFile/P=home /O /Z fileID as filename 
     3315        if (V_flag != 0) 
     3316                Print "HDF5CreateFile failed" 
     3317                return -1 
     3318        endif 
     3319 
     3320        HDF5SaveGroup /IGOR=0 /O /R /Z $dfPath, fileID, "." 
     3321//      HDF5SaveGroup /O /R /Z $dfPath, fileID, "." 
     3322        if (V_flag != 0) 
     3323                Print "HDF5SaveGroup failed" 
     3324                result = -1 
     3325        endif 
     3326         
     3327        HDF5CloseFile fileID 
     3328 
     3329        return result 
     3330End 
Note: See TracChangeset for help on using the changeset viewer.