Ignore:
Timestamp:
Feb 25, 2019 3:17:03 PM (4 years ago)
Author:
srkline
Message:

multiple changes to improve the functionality of VCALC

more values are reported, and the IQ plot now accounts for a beam stop shadowing the low q region. Qmin and qmax values are reported for each panel. the beam intensity value is more realistic, with correct SSD values.

File:
1 edited

Legend:

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

    r1114 r1128  
    154154        F_B_sep = VCALC_getPanelTranslation("FB") 
    155155         
    156         SDD = VCALC_getSDD("FL")                //nominal SDD [cm] - need offset for TB 
     156 
    157157        lam = VCALC_getWavelength() 
    158158 
     
    165165// TODO (make the N along the tube length a variable, since this can be reset @ acquisition) 
    166166 
    167         F_sdd_setback = VCALC_getTopBottomSDDSetback("FT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
     167//      F_sdd_setback = VCALC_getTopBottomSDDSetback("FT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
     168        F_sdd_setback = 0               // this setback is included in the SDD value 
    168169 
    169170// detector data to bin 
     
    206207        V_putDet_beam_center_x("VCALC","FL",xCtr) 
    207208        V_putDet_beam_center_y("VCALC","FL",yCtr) 
    208          
     209 
     210        SDD = VC_getSDD("FL")           // SDD [cm] - INCLUDES offset for TB 
     211                 
    209212//      VC_Detector_2Q(det_FL,qTot_FL,qx_FL,qy_FL,qz_FL,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
    210213        VC_Detector_2Q_NonLin(det_FL,qTot_FL,qx_FL,qy_FL,qz_FL,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,"FL") 
     
    250253        V_putDet_beam_center_x("VCALC","FR",xCtr) 
    251254        V_putDet_beam_center_y("VCALC","FR",yCtr)        
     255         
     256        SDD = VC_getSDD("FR")           // SDD [cm] - INCLUDES offset for TB 
     257         
    252258//      VC_Detector_2Q(det_FR,qTot_FR,qx_FR,qy_FR,qz_FR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
    253259        VC_Detector_2Q_NonLin(det_FR,qTot_FR,qx_FR,qy_FR,qz_FR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,"FR") 
     
    289295        V_putDet_beam_center_x("VCALC","FT",xCtr) 
    290296        V_putDet_beam_center_y("VCALC","FT",yCtr) 
    291            
     297 
     298        SDD = VC_getSDD("FT")           // SDD [cm] - INCLUDES offset for TB 
     299                   
    292300        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
    293301//      VC_Detector_2Q(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    294         VC_Detector_2Q_NonLin(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd+F_sdd_setback,lam,pixSizeX,pixSizeY,"FT") 
     302        VC_Detector_2Q_NonLin(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,"FT") 
    295303 
    296304//      Print "xy for FT = ",xCtr,yCtr 
     
    330338        V_putDet_beam_center_x("VCALC","FB",xCtr) 
    331339        V_putDet_beam_center_y("VCALC","FB",yCtr) 
    332          
     340 
     341        SDD = VC_getSDD("FB")           // SDD [cm] - INCLUDES offset for TB 
     342                 
    333343        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
    334344//      VC_Detector_2Q(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    335         VC_Detector_2Q_NonLin(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_setback,lam,pixSizeX,pixSizeY,"FB") 
     345        VC_Detector_2Q_NonLin(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,"FB") 
    336346 
    337347//      Print "xy for FB = ",xCtr,yCtr 
     
    689699        M_B_sep = VCALC_getPanelTranslation("MB") 
    690700         
    691         SDD = VCALC_getSDD("ML")                //nominal SDD [cm] - need offset for TB 
    692701        lam = VCALC_getWavelength() 
    693702 
     
    699708 
    700709// TODO (make the N along the tube length a variable, since this can be reset @ acquisition) 
    701         M_sdd_setback = VCALC_getTopBottomSDDSetback("MT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
    702  
     710//      M_sdd_setback = VCALC_getTopBottomSDDSetback("MT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
     711        M_sdd_setback = 0 
    703712 
    704713//      SetDataFolder root:Packages:NIST:VSANS:VCALC:Middle 
     
    739748        V_putDet_beam_center_x("VCALC","ML",xCtr) 
    740749        V_putDet_beam_center_y("VCALC","ML",yCtr) 
     750 
     751        SDD = VC_getSDD("ML")           //SDD [cm] - INCLUDES offset for TB 
    741752         
    742753//      VC_Detector_2Q(det_ML,qTot_ML,qx_ML,qy_ML,qz_ML,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    787798        V_putDet_beam_center_x("VCALC","MR",xCtr) 
    788799        V_putDet_beam_center_y("VCALC","MR",yCtr) 
     800 
     801        SDD = VC_getSDD("MR")           //SDD [cm] - INCLUDES offset for TB 
    789802         
    790803//      VC_Detector_2Q(det_MR,qTot_MR,qx_MR,qy_MR,qz_MR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    828841        V_putDet_beam_center_x("VCALC","MT",xCtr) 
    829842        V_putDet_beam_center_y("VCALC","MT",yCtr) 
     843 
     844        SDD = VC_getSDD("MT")           //SDD [cm] - INCLUDES offset for TB 
    830845         
    831846        // global sdd_offset is in (mm), convert to meters here for the Q-calculation   
     
    869884        V_putDet_beam_center_x("VCALC","MB",xCtr) 
    870885        V_putDet_beam_center_y("VCALC","MB",yCtr) 
     886 
     887        SDD = VC_getSDD("MB")           //SDD [cm] - INCLUDES offset for TB 
    871888         
    872889                // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
     
    12571274        B_offset = V_Value 
    12581275         
    1259         SDD = VCALC_getSDD("B")         //nominal SDD - need offset for TB 
     1276        SDD = VC_getSDD("B")            // SDD 
    12601277        lam = VCALC_getWavelength() 
    12611278 
Note: See TracChangeset for help on using the changeset viewer.