Ignore:
Timestamp:
Oct 18, 2018 12:09:16 PM (4 years ago)
Author:
srkline
Message:

extensive changes to accomodate 1x1 binning of the HighRes? detector. It is implemented as a global flag. Currently only 4x4 and 1x1 are allowed. 1x1 has never been tested in reality, only simulated data - so my assumed dimensions may not be correct. look for TODOHIGHRES in the file for places that may need to be updated for different file dimensions. Testing of the simulated data is proving to be excruciatingly slow, but passable for a test. Speed optimization will be needed if this is the final solution. Memory management will also be an issue since every "copy" of the highRes matrix is enormous. Carry as few of these around as possible in the future to keep the experiment size to something reasonable.

File:
1 edited

Legend:

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

    r1115 r1117  
    511511        if(gIgnoreDetB == 0) 
    512512                Wave w = V_getDetectorDataW(fname,"B") 
    513                 w -= kReadNoiseLevel            // a constant value 
    514                  
    515                 MatrixFilter /N=3 /P=3 median w                 //              /P=n flag sets the number of passes (default is 1 pass) 
    516                 Print "*** median noise filter applied to the back detector (3 passes) ***" 
     513                 
     514                NVAR gHighResBinning = root:Packages:NIST:VSANS:Globals:gHighResBinning 
     515                 
     516                switch(gHighResBinning) 
     517                        case 1: 
     518                                w -= kReadNoiseLevel_bin1               // a constant value 
     519                                 
     520                                MatrixFilter /N=11 /P=1 median w                        //              /P=n flag sets the number of passes (default is 1 pass) 
     521                                 
     522                                Print "*** median noise filter 11x11 applied to the back detector (1 pass) ***" 
     523                                break 
     524                        case 4: 
     525                                w -= kReadNoiseLevel_bin4               // a constant value 
     526                                 
     527                                MatrixFilter /N=3 /P=3 median w                 //              /P=n flag sets the number of passes (default is 1 pass) 
     528                                 
     529                                Print "*** median noise filter 3x3 applied to the back detector (3 passes) ***" 
     530                                break 
     531                        default: 
     532                                Abort "No binning case matches in V_Raw_to_Work" 
     533                endswitch        
     534 
    517535        endif 
    518536         
     
    582600                                // -- the pixel value is needed for display of the panels 
    583601                                if(kBCTR_CM) 
    584                                         //V_ConvertBeamCtr_to_mm(folder,detStr,destPath) 
     602                                        //V_ConvertBeamCtrPix_to_mm(folder,detStr,destPath) 
    585603                                        // 
    586604         
     
    598616                                else 
    599617                                        // beam center is in pixels, so use the old routine 
    600                                         V_ConvertBeamCtr_to_mm(fname,detStr,destPath) 
     618                                        V_ConvertBeamCtrPix_to_mm(fname,detStr,destPath) 
    601619                                endif            
    602620                                                         
     
    640658//              else 
    641659                        // beam center is in pixels, so use the old routine 
    642                         V_ConvertBeamCtr_to_mmB(fname,detStr,destPath) 
     660                        V_ConvertBeamCtrPix_to_mmB(fname,detStr,destPath) 
    643661 
    644662//              endif 
Note: See TracChangeset for help on using the changeset viewer.