Ignore:
Timestamp:
May 20, 2016 4:28:56 PM (7 years ago)
Author:
srkline
Message:

changes to a few analysis models to make these Igor 7-ready

adding mask editing utilities

many changes to event mode for easier processing of split lists

updated event mode help file

+ lots more!

File:
1 edited

Legend:

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

    r994 r999  
    302302 
    303303 
    304 ////////////////////// MASK FILE 
    305  
    306  
    307 // TODO 
    308 // currently, there are no dummy fill values or attributes for the fake MASK file 
    309 // 
    310 Proc Setup_VSANS_MASK_Struct() 
    311  
    312         // lays out the tree and fills with dummy values 
    313         H_Setup_VSANS_MASK_Structure() 
    314          
    315         // writes in the attributes 
    316 //      H_Fill_VSANS_Attributes() 
    317          
    318         // fill in with VCALC simulation bits 
    319 //      H_Fill_VSANS_wSim() 
    320          
    321 End 
    322  
    323 Proc Save_VSANS_MASK_Nexus(fileName) 
    324         String fileName="Test_VSANS_MASK_file" 
    325  
    326         // save as HDF5 (no attributes saved yet) 
    327         Save_VSANS_file("root:VSANS_MASK_file", fileName+".h5") 
    328          
    329         // read in a data file using the gateway-- reads from the home path 
    330         H_HDF5Gate_Read_Raw(fileName+".h5") 
    331          
    332         // after reading in a "partial" file using the gateway (to generate the xref) 
    333         // Save the xref to disk (for later use) 
    334         Save_HDF5___xref("root:"+fileName,"HDF5___xref") 
    335          
    336         // after you've generated the HDF5___xref, load it in and copy it 
    337         // to the necessary folder location. 
    338         Copy_HDF5___xref("root:VSANS_MASK_file", "HDF5___xref") 
    339          
    340         // writes out the contents of a data folder using the gateway 
    341         H_HDF5Gate_Write_Raw("root:VSANS_MASK_file", fileName+".h5") 
    342  
    343         // re-load the data file using the gateway-- reads from the home path 
    344         // now with attributes 
    345         H_HDF5Gate_Read_Raw(fileName+".h5") 
    346          
    347 End 
    348  
    349 ////////////// fake MASK file tests 
    350 // 
    351 // 
    352 //      Make/O/T/N=1    file_name       = "VSANS_MASK_test.h5" 
    353 // 
    354 // simple generation of a fake MASK file. for sans, nothing other than the creation date was written to the  
    355 // file header. nothing more is needed (possibly) 
    356 // 
    357 // 
    358 // TODO -- make the number of pixels GLOBAL 
    359 // TODO -- there will be lots of work to do to develop the procedures necessary to actually generate the  
    360 //      9 data sets to become the MASK file contents. More complexity here than for the simple SANS case. 
    361 // 
    362 // TODO -- this is currently random 0|1 values, need to write an editor 
    363 // 
    364 // currently set up to use 0 = exclude and 1 = keep  
    365 // 
    366 Proc H_Setup_VSANS_MASK_Structure() 
    367          
    368         NewDataFolder/O/S root:VSANS_MASK_file           
    369  
    370         NewDataFolder/O/S root:VSANS_MASK_file:entry     
    371                 Make/O/T/N=1    title   = "This is a fake MASK file for VSANS" 
    372                 Make/O/T/N=1    start_date      = "2015-02-28T08:15:30-5:00" 
    373                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument          
    374                         Make/O/T/N=1    name    = "NG3_VSANS" 
    375                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_B       
    376                         Make/O/I/N=(150,150)    data    = 1 
    377                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_MR              
    378                         Make/O/I/N=(48,128)     data    = 1 
    379                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_ML              
    380                         Make/O/I/N=(48,128)     data    = 1 
    381                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_MT              
    382                         Make/O/I/N=(128,48)     data    = 1 
    383                         data[0,49][] = 0 
    384                         data[78,127][] = 0 
    385                         data[50,77][] = 1 
    386                          
    387                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_MB              
    388                         Make/O/I/N=(128,48)     data    = 1 
    389                         data[0,49][] = 0 
    390                         data[78,127][] = 0 
    391                         data[50,77][] = 1 
    392                          
    393                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_FR              
    394                         Make/O/I/N=(48,128)     data    = 1 
    395                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_FL              
    396                         Make/O/I/N=(48,128)     data    = 1 
    397                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_FT              
    398                         Make/O/I/N=(128,48)     data    = 1 
    399                         data[0,49][] = 0 
    400                         data[78,127][] = 0 
    401                         data[50,77][] = 1 
    402  
    403                 NewDataFolder/O/S root:VSANS_MASK_file:entry:instrument:detector_FB              
    404                         Make/O/I/N=(128,48)     data    = 1 
    405                         data[0,49][] = 0 
    406                         data[78,127][] = 0 
    407                         data[50,77][] = 1 
    408                          
    409         SetDataFolder root: 
    410  
    411 End 
     304 
     305 
    412306 
    413307 
Note: See TracChangeset for help on using the changeset viewer.