Ignore:
Timestamp:
Apr 16, 2018 10:50:33 AM (4 years ago)
Author:
srkline
Message:

Added two model functions for white beam smearing.

Many other small changes for processing of the back detector, shuffling of VSANS menu items, and consistent naming of V_ procedures.

File:
1 edited

Legend:

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

    r1094 r1095  
    715715// calculate all of the q-values 
    716716// sdd is passed in [cm] 
    717         qTot = V_CalcQval(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    718         qx = V_CalcQX(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    719         qy = V_CalcQY(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    720         qz = V_CalcQZ(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    721          
     717 
     718 
     719// after adding in the 680x1656 back detector, load time was 7.8s, without multithreading 
     720// with multithreading, 1.9s 
     721//       qTot = V_CalcQval(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     722//              qx = V_CalcQX(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     723//              qy = V_CalcQY(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     724//              qz = V_CalcQZ(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY)    
     725 
     726        MultiThread qTot = V_CalcQval(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     727        MultiThread     qx = V_CalcQX(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     728        MultiThread     qy = V_CalcQY(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
     729        MultiThread     qz = V_CalcQZ(p,q,xCtr,yCtr,sdd,lambda,data_realDistX,data_realDistY) 
    722730         
    723731        return(0) 
     
    739747//returned magnitude of Q is in 1/Angstroms 
    740748// 
    741 Function V_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
     749ThreadSafe Function V_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    742750        Variable xaxval,yaxval,xctr,yctr,sdd,lam 
    743751        Wave distX,distY 
     
    769777// this properly accounts for qz 
    770778// 
    771 Function V_CalcQX(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
     779ThreadSafe Function V_CalcQX(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    772780        Variable xaxval,yaxval,xctr,yctr,sdd,lam 
    773781        Wave distX,distY 
     
    803811// this properly accounts for qz 
    804812// 
    805 Function V_CalcQY(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
     813ThreadSafe Function V_CalcQY(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    806814        Variable xaxval,yaxval,xctr,yctr,sdd,lam 
    807815        Wave distX,distY 
     
    838846// this properly accounts for qz, because it is qz 
    839847// 
    840 Function V_CalcQZ(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
     848ThreadSafe Function V_CalcQZ(xaxval,yaxval,xctr,yctr,sdd,lam,distX,distY) 
    841849        Variable xaxval,yaxval,xctr,yctr,sdd,lam 
    842850        Wave distX,distY 
Note: See TracChangeset for help on using the changeset viewer.