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/VC_DetectorBinning_Utils.ipf

    r1108 r1117  
    5454        Variable addEmpBgd=0 
    5555         
    56                  
     56// TODOHIGHRES 
     57// this is a slow step - try to figure out how to multithread this efficiently. simply adding the  
     58//  keyword has little effect. maybe only do this for "B", maybe rewrite the calculation to not use pq indexing 
     59//               
    5760        String funcStr = VCALC_getModelFunctionStr() 
    5861        strswitch(funcStr) 
     
    6467                        break 
    6568                case "Debye": 
    66                         tmpInten = VC_Debye(10,300,0.0001,qTot[p][q]) 
     69                        MultiThread tmpInten = VC_Debye(10,300,0.0001,qTot[p][q]) 
    6770                        break 
    6871                case "Sphere": 
     
    278281                V_NonLinearCorrection_B("VCALC",data,tmpCalibX,tmpCalibY,detStr,destPath) 
    279282                // beam center is in pixels, so use the old routine 
    280                 V_ConvertBeamCtr_to_mmB("VCALC","B",destPath) 
     283                V_ConvertBeamCtrPix_to_mmB("VCALC","B",destPath) 
    281284        else 
    282285                V_NonLinearCorrection("VCALC",data,tmpCalib,tube_width,detStr,destPath) 
     
    565568End 
    566569 
    567 Function VC_Debye(scale,rg,bkg,x) 
     570ThreadSafe Function VC_Debye(scale,rg,bkg,x) 
    568571        Variable scale,rg,bkg 
    569572        Variable x 
     
    701704        else 
    702705                delQ = abs(qy[0][1] - qy[0][0])/2 
     706        endif 
     707 
     708// TODOHIGHRES 
     709// -- is this how I want to handle the too-fine resolution of 1x1 binning? 
     710        NVAR gHighResBinning = root:Packages:NIST:VSANS:Globals:gHighResBinning 
     711 
     712        if(cmpstr(detStr,"B") == 0 && gHighResBinning == 1) 
     713                delQ = 4*delQ 
     714                Print "Reset delta Q for binning the back detector to 4x pix = ",delQ 
    703715        endif 
    704716         
Note: See TracChangeset for help on using the changeset viewer.