Ignore:
Timestamp:
Apr 12, 2016 2:30:46 PM (7 years ago)
Author:
srkline
Message:

more additions to HDF reader to work with the Nexus definition

Additions to SANS event mode processing to allow proper processing of large data streams. Data was inproperly saved after decimation without correcting for the decimation. Instead, use decimation for screening, and bin the full data (splits) on the fly.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
Files:
2 edited

Legend:

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

    r988 r989  
    572572// TODO -- string could be checked for length, but returned right or wrong 
    573573// 
     574// -- currently num is completely ignored 
     575// 
    574576Function/S V_getStringFromHDF5(fname,path,num) 
    575577        String fname,path 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf

    r984 r989  
    175175//////// TOP LEVEL 
    176176 
    177 // nexus version used for definitions 
    178 Function/S V_getNeXus_version(fname) 
    179         String fname 
    180          
    181         String path = "entry:NeXus_version"      
    182         Variable num=60 
    183         return(V_getStringFromHDF5(fname,path,num)) 
    184 End 
     177//// nexus version used for definitions 
     178//Function/S V_getNeXus_version(fname) 
     179//      String fname 
     180//       
     181//      String path = "entry:NeXus_version"      
     182//      Variable num=60 
     183//      return(V_getStringFromHDF5(fname,path,num)) 
     184//End 
    185185 
    186186// TODO -- not mine, added somewhere by Nexus writer? 
     
    265265        return(V_getRealValueFromHDF5(fname,path)) 
    266266End 
     267 
     268// TODO - should be the file name as saved on disk, currently it's not 
     269Function/S V_getFile_name(fname) 
     270        String fname 
     271         
     272        String path = "entry:file_name"  
     273        Variable num=60 
     274        return(V_getStringFromHDF5(fname,path,num)) 
     275End 
    267276                 
    268277// 
     
    382391 
    383392// control mode for data acquisition, "timer" 
     393// TODO - what are the enumerated types for this? 
    384394Function/S V_getControlMode(fname) 
    385395        String fname 
     
    405415end 
    406416 
     417// TODO - what are the enumerated types for this? 
    407418Function V_getPreset(fname) 
    408419        String fname 
     
    420431//////// INSTRUMENT 
    421432 
     433// TODO -- this does not appear to be written out 
    422434Function/S V_getLocalContact(fname) 
    423435        String fname 
     
    445457 
    446458////// INSTRUMENT/ATTENUATOR 
    447 // TODO 
    448 // attenuator number -- for VSANS I think I want this to be some "binary" representation  
    449 // of 4 plates in/out - so this may be an integer-> binary, or a text string (4 char) 
    450 Function V_getAtten_number(fname) 
    451         String fname 
    452          
    453         String path = "entry:instrument:attenuator:atten_number"         
    454         return(V_getRealValueFromHDF5(fname,path)) 
    455 end 
    456  
     459// TODO - be sure of the definition of these terms 
     460// 
    457461 
    458462// transmission value for the attenuator in the beam 
     
    474478end 
    475479 
     480// desired thickness 
     481Function V_getAtten_desired_thickness(fname) 
     482        String fname 
     483         
     484        String path = "entry:instrument:attenuator:desired_thickness"    
     485        return(V_getRealValueFromHDF5(fname,path)) 
     486end 
     487 
     488 
     489 
    476490// distance from the attenuator to the sample (units??) 
    477491Function V_getAttenDistance(fname) 
     
    483497 
    484498 
    485 // attenuator index, to use in the lookup table of transmission values 
    486 Function V_getAttenIndex(fname) 
    487         String fname 
    488          
    489         String path = "entry:instrument:attenuator:index"        
    490         return(V_getRealValueFromHDF5(fname,path)) 
    491 end 
    492  
     499//// attenuator index, to use in the lookup table of transmission values 
     500//Function V_getAttenIndex(fname) 
     501//      String fname 
     502//       
     503//      String path = "entry:instrument:attenuator:index"        
     504//      return(V_getRealValueFromHDF5(fname,path)) 
     505//end 
     506 
     507// table of the attenuation factor error 
     508Function V_getAttenIndex_error_table(fname,outW) 
     509        String fname 
     510        Wave outW 
     511         
     512        String path = "entry:instrument:attenuator:index_error_table" 
     513        WAVE w = V_getRealWaveFromHDF5(fname,path) 
     514 
     515        outW = w 
     516        return(0) 
     517end 
    493518 
    494519// table of the attenuation factor 
     
    503528        return(0) 
    504529end 
    505  
    506  
    507 // status "in or out" 
    508 Function/S V_getAttenStatus(fname) 
    509         String fname 
    510  
    511         String path = "entry:instrument:attenuator:status" 
    512         Variable num=60 
    513         return(V_getStringFromHDF5(fname,path,num)) 
    514 End 
     530// 
     531//// status "in or out" 
     532//Function/S V_getAttenStatus(fname) 
     533//      String fname 
     534// 
     535//      String path = "entry:instrument:attenuator:status" 
     536//      Variable num=60 
     537//      return(V_getStringFromHDF5(fname,path,num)) 
     538//End 
     539 
     540Function V_getAtten_number(fname) 
     541        String fname 
     542         
     543        String path = "entry:instrument:attenuator:num_atten_dropped"    
     544        return(V_getRealValueFromHDF5(fname,path)) 
     545end 
    515546 
    516547// thickness of the attenuator (PMMA) - units?? 
Note: See TracChangeset for help on using the changeset viewer.