Ignore:
Timestamp:
Mar 13, 2017 1:39:33 PM (6 years ago)
Author:
srkline
Message:

adding to the functionality of the data reduction protocol

getting the 1D plotting to work both as a standalone plot and part of the reduction protocol (where the choices are all made and fed in)

added log/lin toggle to 1D display. abc exponent scaling is fundamentally more messy, and has been shelved for now. Revisit if demand is there.

fixed bug in how raw data files are identified, to prevent .abs files from being incorrectly identified as raw (if same name before extension). Works correctly now, but may need tweak in future if naming scheme changes.

File:
1 edited

Legend:

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

    r1026 r1027  
    471471        // -- update the 1D plotting as needed. these are SANS calls (OK for now, but will need to be better) 
    472472        //do the average and plot (either the default, or what is on the panel currently) 
    473         V_PlotData_Panel() 
     473        V_PlotData_Panel(-9999)         // read the binType from the panel 
    474474         
    475475 
     
    581581//  do when they fail? I don't want them to spit up another open file dialog 
    582582// 
     583// -- problem -- if "sans1234.abs" is passed, then V_getStringFromHDF5(fname,path,num) 
     584//  will remove the extension and look for the sans1234 folder -- which may or may not be present. 
     585//  If it is present, then sans1234 validates as RAW data -- which is incorrect! 
     586// -- so I need a way to exclude everything that does not have the proper extension... 
     587// 
     588// 
    583589Function V_CheckIfRawData(fname) 
    584590        String fname 
    585591         
    586         Variable refnum,totalBytes 
    587592        String testStr="" 
    588          
    589         testStr = V_getInstrumentName(fname) 
    590  
    591         if(cmpstr(testStr,"NG3-VSANS") == 0) 
    592                 //testStr exists, ASSUMING it's a raw VSANS data file 
    593                 Return(1) 
     593 
     594// check for the proper raw data extension 
     595        if( stringmatch(fname,"*.nxs.ngv*") ) 
     596                // name appears OK, proceed 
     597                testStr = V_getInstrumentName(fname) 
     598 
     599                if(cmpstr(testStr,"NG3-VSANS") == 0) 
     600                        //testStr exists, ASSUMING it's a raw VSANS data file 
     601                        Return(1) 
     602                else 
     603                        //some other file 
     604                        Return(0) 
     605                Endif 
     606         
    594607        else 
    595                 //some other file 
    596                 Return(0) 
    597         Endif 
     608                // not a proper raw VSANS file name 
     609                return(0) 
     610                 
     611        endif    
     612         
     613 
    598614End 
    599615 
     
    890906                item = StringFromList(ii, list  ,";") 
    891907 
    892                 validName = V_FindValidFileName(item) 
    893                 if(strlen(validName) != 0)              //non-null return from FindValidFileName() 
    894                         fullName = path + validName              
    895  
    896         //method (1)                     
    897 //                      if(V_CheckIfRawData(item)) 
    898 //                              newlist += item + ";" 
    899 //                      endif 
     908//              validName = V_FindValidFileName(item) 
     909//              if(strlen(validName) != 0)              //non-null return from FindValidFileName() 
     910//                      fullName = path + validName              
    900911 
    901912        //method (2)                     
     
    905916 
    906917                         
    907                 endif 
     918//              endif 
    908919                //print "ii=",ii 
    909920        endfor 
Note: See TracChangeset for help on using the changeset viewer.