Ignore:
Timestamp:
Nov 16, 2017 10:57:32 AM (5 years ago)
Author:
srkline
Message:

lots of changes here:
many little fixes to clean up TODO items and marke them DONE

changed the handling of the panel "gap" to split the gap evenly. Q-calculations have been re-verified with this change.

re-named the list of "bin Type" values, and added a few more choices. Streamlined how the averaging and plotting works with this list so that it can be more easily modified as different combinations of binning are envisioned. This resulted in a lot of excess code being cut out and replaced with cleaner logic. This change has also been verified to work as intended.

Attenuation is now always calculated from the table. The table also by (NEW) definition has values for the white beam (one waelength) and graphite (multiple possible wavelengths) where the wavelengths are artificially scaled (*1000) or *1e6) so that the interpolations can be done internally without the need for multiple attenuator tables.

File:
1 edited

Legend:

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

    r1064 r1073  
    66// 
    77// for use by multiple panels and packages 
    8  
    9  
    10 //prompts user to choose the local folder that contains the SANS Data 
     8// 
     9 
     10 
     11//prompts user to choose the local folder that contains the VSANS Data 
    1112//only one folder can be used, and its path is catPathName (and is a NAME, not a string) 
    1213//this will overwrite the path selection 
     
    7677        return(WaveExists(w)) 
    7778end 
     79 
     80 
    7881// 
    7982// tests if two values are close enough to each other 
     
    9497 
    9598 
    96 // TODO: 
    97 // -- this must be called as needed to force a re-read of the data from disk 
     99// (DONE): 
     100// x- this must be called as needed to force a re-read of the data from disk 
    98101//    "as needed" means that when an operation is done that needs to ensure 
    99102//     a fresh read from disk, it must take care of the kill. 
    100 // -- the ksBaseDFPath needs to be removed. It's currently pointing to RawVSANS, which is 
     103// x- the ksBaseDFPath needs to be removed. It's currently pointing to RawVSANS, which is 
    101104//    really not used as intended anymore. 
     105// 
     106// *** this appears to be unused, in favor of V_CleanupData_w_Progress(0,1)  ********** 
    102107// 
    103108Function V_KillNamedDataFolder(fname) 
     
    115120end 
    116121 
    117 // TODO: 
     122// (DONE) 
    118123// x- this still does not quite work. If there are no sub folders present in the RawVSANS folder 
    119124//    it still thinks there is (1) item there. 
    120 // -- if I replace the semicolon with a comma, it thinks there are two folders present and appears 
     125// x- if I replace the semicolon with a comma, it thinks there are two folders present and appears 
    121126//    to delete the RawVSANS folder itself! seems very dangerous...this is because DataFolderDir returns 
    122127//    a comma delimited list, but with a semicolon and \r at the end. need to remove these... 
     
    212217                endif 
    213218                 
    214                 ValDisplay valdisp0,win=ProgressPanel,value= _NUM:num,win=ProgressPanel 
     219                ValDisplay valdisp0,win=ProgressPanel,value= _NUM:num 
    215220                DoUpdate /W=ProgressPanel 
    216221        while(1) 
     
    501506        V_PlotData_Panel()              // read the binType from the panel 
    502507        Variable binType = V_GetBinningPopMode() 
    503         V_BinningModePopup("",binType,"")               // does default circular binning and updates the graph 
     508        ControlInfo/W=V_1D_Data popup0 
     509        V_BinningModePopup("",binType,S_Value)          // does default circular binning and updates the graph 
    504510 
    505511 
     
    607613//      (check the instrument name...) 
    608614 
    609 // TODO -- as was written by SANS, this function is expecting fname to be the path:fileName 
     615// (DONE) x- as was written by SANS, this function is expecting fname to be the path:fileName 
    610616// - but are the V_get() functions OK with getting a full path, and what do they 
    611617//  do when they fail? I don't want them to spit up another open file dialog 
    612618// 
    613 // -- problem -- if "sans1234.abs" is passed, then V_getStringFromHDF5(fname,path,num) 
     619// x- problem -- if "sans1234.abs" is passed, then V_getStringFromHDF5(fname,path,num) 
    614620//  will remove the extension and look for the sans1234 folder -- which may or may not be present. 
    615621//  If it is present, then sans1234 validates as RAW data -- which is incorrect! 
    616 // -- so I need a way to exclude everything that does not have the proper extension... 
     622// x- so I need a way to exclude everything that does not have the proper extension... 
    617623// 
    618624// 
     
    673679 
    674680 
    675 // TODO -- the file name structure for VSANS file is undecided 
     681// (DONE) x- the file name structure for VSANS file is undecided 
    676682// so some of these base functions will need to change 
    677683// 
Note: See TracChangeset for help on using the changeset viewer.