Ignore:
Timestamp:
May 2, 2017 1:09:17 PM (5 years ago)
Author:
srkline
Message:

changes to streamline the data plotting of 1D data, in preparation for different modes of combining detector panels. Also will allow better integration with protocols to combine 1D data, which can now be part of the protocol.

Other changes, but I can't remember whtat they were...

File:
1 edited

Legend:

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

    r1031 r1035  
    3333 
    3434 
     35Strconstant ksBinTypeStr = "One;Two;Four;Slit Mode;" 
     36 
     37// NOTE 
     38// this is the master conversion function 
     39// ***Use no others 
     40// *** When other bin types are developed, DO NOT reassign these numbers. 
     41//  instead, skip the old numbers and assign new ones. 
     42// old modes can be removed from the string constant ksBinTypeStr (above), but the  
     43// mode numbers are what many different binning, plotting, and reduction functions are 
     44// switching on. In the future, it may be necessary to change the key (everywhere) to a string 
     45// switch, but for now, stick with the numbers. 
     46Function V_BinTypeStr2Num(binStr) 
     47        String binStr 
     48         
     49        Variable binType 
     50        strswitch(binStr)       // string switch 
     51                case "One": 
     52                        binType = 1 
     53                        break           // exit from switch 
     54                case "Two": 
     55                        binType = 2 
     56                        break           // exit from switch 
     57                case "Four": 
     58                        binType = 3 
     59                        break           // exit from switch 
     60                case "Slit Mode": 
     61                        binType = 4 
     62                        break           // exit from switch 
     63 
     64                default:                        // optional default expression executed 
     65                        binType = 0 
     66                        Abort "Binning mode not found"// when no case matches 
     67        endswitch        
     68        return(binType) 
     69end 
     70 
    3571Function V_QBinAllPanels(folderStr,binType) 
    3672        String folderStr 
     
    4783//// TODO: 
    4884// 
    49 //       
     85//      Back detector is handled spearately since there is nothing to combine 
     86// 
    5087        delQ = SetDeltaQ(folderStr,"B") 
    5188         
     
    155192        endif 
    156193         
    157         V_Write1DData(type,saveName) 
     194        V_Write1DData(curtype,saveName) 
    158195 
    159196End 
Note: See TracChangeset for help on using the changeset viewer.