Ignore:
Timestamp:
May 22, 2019 2:36:28 PM (3 years ago)
Author:
srkline
Message:

some addtions:

DIV file generation is now aware of the High resolution detector, but the procedures are still awaiting data for testing.

Read Noise file can now be read in and stored in the (RAW) folder ReadNoise?. This is not a work folder and the data isnot changed from the RAW state. This image is then subtracted from other raw data as it is converted to a work file (SAM, EMP, etc.) Previously, only a constant value was subtracted. If the ReadNoise? data is not present, the constant will be subtracted. There is a menu option to load the ReadNoise? data.

File:
1 edited

Legend:

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

    r1145 r1151  
    470470//  or count dependent). It does not appear to be dependent on gain, and is hoepfully stable over time. 
    471471// 
     472// May 2019 
     473// If present, a detector image of the back detector containing the read noise (non-uniform values) 
     474//  is subtracted rather than a single constant value. 
     475// 
    472476//the current display type is updated to newType (global) 
    473477// 
     
    513517        if(gIgnoreDetB == 0) 
    514518                Wave w = V_getDetectorDataW(fname,"B") 
    515                  
    516                 NVAR gHighResBinning = root:Packages:NIST:VSANS:Globals:gHighResBinning 
    517                  
    518                 switch(gHighResBinning) 
    519                         case 1: 
    520                                 w -= kReadNoiseLevel_bin1               // a constant value 
    521                                  
    522 //                              MatrixFilter /N=11 /P=1 median w                        //              /P=n flag sets the number of passes (default is 1 pass)                  
    523 //                              Print "*** median noise filter 11x11 applied to the back detector (1 pass) ***" 
    524                                 Print "*** 1x1 binning - subtracted ReadNoise - No Filter ***" 
    525                                 break 
    526                         case 4: 
    527                                 w -= kReadNoiseLevel_bin4               // a constant value 
    528                                  
    529 //                              MatrixFilter /N=3 /P=3 median w                 //              /P=n flag sets the number of passes (default is 1 pass)                          
    530 //                              Print "*** median noise filter 3x3 applied to the back detector (3 passes) ***" 
    531                                 Print "*** 4x4 binning - subtracted ReadNoise - No Filter ***" 
    532                                 break 
    533                         default: 
    534                                 Abort "No binning case matches in V_Raw_to_Work" 
    535                 endswitch        
    536  
    537         endif 
     519                // I hate to hard-wire this, but the data must be in this specific location... 
     520                Wave/Z w_ReadNoise = $("root:Packages:NIST:VSANS:ReadNoise:entry:instrument:detector_B:data") 
     521//              Wave/Z w_ReadNoise = V_getDetectorDataW("ReadNoise","B") 
     522                 
     523                if(WaveExists(w_ReadNoise)) 
     524                        w -= w_ReadNoise 
     525                        Print "Subtracting ReadNoise Array" 
     526                else 
     527                        NVAR gHighResBinning = root:Packages:NIST:VSANS:Globals:gHighResBinning 
     528                         
     529                        switch(gHighResBinning) 
     530                                case 1: 
     531                                        w -= kReadNoiseLevel_bin1               // a constant value 
     532                                         
     533        //                              MatrixFilter /N=11 /P=1 median w                        //              /P=n flag sets the number of passes (default is 1 pass)                  
     534        //                              Print "*** median noise filter 11x11 applied to the back detector (1 pass) ***" 
     535                                        Print "*** 1x1 binning - subtracted ReadNoise Constant - No Filter ***" 
     536                                        break 
     537                                case 4: 
     538                                        w -= kReadNoiseLevel_bin4               // a constant value 
     539                                         
     540        //                              MatrixFilter /N=3 /P=3 median w                 //              /P=n flag sets the number of passes (default is 1 pass)                          
     541        //                              Print "*** median noise filter 3x3 applied to the back detector (3 passes) ***" 
     542                                        Print "*** 4x4 binning - subtracted ReadNoise Constant - No Filter ***" 
     543                                        break 
     544                                default: 
     545                                        Abort "No binning case matches in V_Raw_to_Work" 
     546                        endswitch        
     547                endif           //waveExists 
     548        endif           // using det B 
    538549         
    539550         
Note: See TracChangeset for help on using the changeset viewer.