Ignore:
Timestamp:
Mar 1, 2019 12:56:34 PM (4 years ago)
Author:
srkline
Message:

verification of the updated beam centers based on fitted arcs of Silver Behenate

File:
1 edited

Legend:

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

    r1119 r1131  
    885885End 
    886886 
    887 // TODO: 
     887//these are values from Dec 2018 data and the CENTROID on FR or MR 
     888Constant kBCtrOffset_FL_x = 0.13 
     889Constant kBCtrOffset_FL_y = 0.35 
     890Constant kBCtrOffset_FB_x = 0.95 
     891Constant kBCtrOffset_FB_y = 0.77 
     892Constant kBCtrOffset_FT_x = 1.59 
     893Constant kBCtrOffset_FT_y = 0.09 
     894Constant kBCtrOffset_ML_x = 0.26 
     895Constant kBCtrOffset_ML_y = -0.16 
     896Constant kBCtrOffset_MB_x = -0.89 
     897Constant kBCtrOffset_MB_y = 0.96 
     898Constant kBCtrOffset_MT_x = -0.28 
     899Constant kBCtrOffset_MT_y = 0.60 
     900 
     901////these are values from Dec 2018 data and the FITTED ARC on FR or MR 
     902// don't use these - the values from the centroid are superior) FEB 2019 
     903//Constant kBCtrOffset_FL_x = 0.49 
     904//Constant kBCtrOffset_FL_y = 0.48 
     905//Constant kBCtrOffset_FB_x = 1.31 
     906//Constant kBCtrOffset_FB_y = 0.90 
     907//Constant kBCtrOffset_FT_x = 1.95 
     908//Constant kBCtrOffset_FT_y = 0.22 
     909//Constant kBCtrOffset_ML_x = 0.44 
     910//Constant kBCtrOffset_ML_y = -0.32 
     911//Constant kBCtrOffset_MB_x = -0.71 
     912//Constant kBCtrOffset_MB_y = 0.80 
     913//Constant kBCtrOffset_MT_x = -0.10 
     914//Constant kBCtrOffset_MT_y = 0.44 
     915 
     916// (DONE): 
    888917// if I change any of these values, I need to also change them in the V_FindCentroid function  
    889 // in V_Marquee_Operation.ipf 
    890 // 
    891 // ** updated these values for the FRONT only with fitted arcs of AgBeh (Dec 2018 data, multiple runs) 
     918// in V_Marquee_Operation.ipf (FEB 2019, this is done automatically with the defined constants) 
     919// 
     920// ** updated these values with fitted arcs of AgBeh (Dec 2018 data, multiple runs) 
    892921// 
    893922Proc V_fDeriveBeamCenters_VelSel(x_FrontReference,y_FrontReference,x_MiddleReference,y_MiddleReference) 
     
    901930//      newXCtr_cm[0] = x_FrontReference - (0.03 + 0.03)/2              //OLD, pre Dec 2018 
    902931//      newYCtr_cm[0] = y_FrontReference + (0.34 + 0.32)/2 
    903         newXCtr_cm[0] = x_FrontReference + 0.13                         //NEW Dec 2018 
    904         newYCtr_cm[0] = y_FrontReference + 0.35 
     932        newXCtr_cm[0] = x_FrontReference + kBCtrOffset_FL_x                             //NEW Dec 2018 
     933        newYCtr_cm[0] = y_FrontReference + kBCtrOffset_FL_y 
    905934        // FB 
    906935//      newXCtr_cm[3] = x_FrontReference - (2.02 + 2.06)/2              // OLD, pre Dec 2018 
    907936//      newYCtr_cm[3] = y_FrontReference - (0.12 + 0.19)/2              // (-) is correct here 
    908         newXCtr_cm[3] = x_FrontReference + 0.95                                 // NEW Dec 2018 
    909         newYCtr_cm[3] = y_FrontReference + 0.77 
     937        newXCtr_cm[3] = x_FrontReference + kBCtrOffset_FB_x                                     // NEW Dec 2018 
     938        newYCtr_cm[3] = y_FrontReference + kBCtrOffset_FB_y 
    910939        // FT  
    911940//      newXCtr_cm[2] = newXCtr_cm[3]                           // OLD, pre Dec 2018 
    912941//      newYCtr_cm[2] = newYCtr_cm[3] 
    913         newXCtr_cm[2] = x_FrontReference + 1.59                         // NEW Dec 2018 (not a duplicate of FB anymore) 
    914         newYCtr_cm[2] = y_FrontReference + 0.09 
     942        newXCtr_cm[2] = x_FrontReference + kBCtrOffset_FT_x                             // NEW Dec 2018 (not a duplicate of FB anymore) 
     943        newYCtr_cm[2] = y_FrontReference + kBCtrOffset_FT_y 
    915944         
    916945        // MR 
     
    920949//      newXCtr_cm[4] = x_MiddleReference - (0.06 + 0.05)/2 
    921950//      newYCtr_cm[4] = y_MiddleReference + (0.14 + 0.01)/2 
    922         newXCtr_cm[4] = x_MiddleReference + 0.26 
    923         newYCtr_cm[4] = y_MiddleReference - 0.16 
     951        newXCtr_cm[4] = x_MiddleReference + kBCtrOffset_ML_x 
     952        newYCtr_cm[4] = y_MiddleReference + kBCtrOffset_ML_y 
    924953        // MB 
    925954//      newXCtr_cm[7] = x_MiddleReference - (0.51 + 0.62)/2 
    926955//      newYCtr_cm[7] = y_MiddleReference + (0.79 + 0.74)/2 
    927         newXCtr_cm[7] = x_MiddleReference - 0.89 
    928         newYCtr_cm[7] = y_MiddleReference + 0.96 
     956        newXCtr_cm[7] = x_MiddleReference + kBCtrOffset_MB_x 
     957        newYCtr_cm[7] = y_MiddleReference + kBCtrOffset_MB_y 
    929958        // MT  
    930         newXCtr_cm[6] = x_MiddleReference - 0.28 
    931         newYCtr_cm[6] = y_MiddleReference + 0.60 
     959        newXCtr_cm[6] = x_MiddleReference + kBCtrOffset_MT_x 
     960        newYCtr_cm[6] = y_MiddleReference + kBCtrOffset_MT_y 
    932961         
    933962         
     
    939968        return 
    940969End 
    941  
    942 // 
    943 // these values for FRONT use improved, fitted arcs from AgBeh. Data was fitted in pixels and converted to cm 
    944 // data from Sept 2018 (run 17994) 
    945 Proc V_DeriveBeamCenters_Graphite() 
    946  
    947         Make/O/T panelWave = {"FL","FR","FT","FB","ML","MR","MT","MB","B"} 
    948         Make/O/D/N=9 newXCtr_cm,newYCtr_cm 
    949          
    950         Edit panelWave,newXCtr_cm,newYCtr_cm 
    951          
    952         DoAlert 0, "enter the measured beam center reference for Front and Middle panels" 
    953         V_fDeriveBeamCenters_Graphite() 
    954          
    955 End 
    956  
    957 // units are in [cm] 
    958 Proc V_fDeriveBeamCenters_Graphite(x_FrontReference,y_FrontReference,x_MiddleReference,y_MiddleReference) 
    959         Variable x_FrontReference,y_FrontReference,x_MiddleReference,y_MiddleReference 
    960          
    961         // start with the front 
    962         // FR 
    963         newXCtr_cm[1] = x_FrontReference - 0.08 
    964         newYCtr_cm[1] = y_FrontReference - 0.08 
    965         // FL 
    966         newXCtr_cm[0] = x_FrontReference - 0.03 
    967         newYCtr_cm[0] = y_FrontReference + 0.28 
    968         // FB 
    969         newXCtr_cm[3] = x_FrontReference + 1.42 
    970         newYCtr_cm[3] = y_FrontReference + 0.55 
    971         // FT  
    972         newXCtr_cm[2] = x_FrontReference + 1.92 
    973         newYCtr_cm[2] = y_FrontReference + 0.05 
    974          
    975         // no new data for the middle detector + graphite, so these values don't change 
    976         // MR 
    977         newXCtr_cm[5] = x_MiddleReference 
    978         newYCtr_cm[5] = y_MiddleReference 
    979         // ML 
    980         newXCtr_cm[4] = x_MiddleReference - (0.06 + 0.05)/2 
    981         newYCtr_cm[4] = y_MiddleReference + (0.14 + 0.01)/2 
    982         // MB 
    983         newXCtr_cm[7] = x_MiddleReference - (0.51 + 0.62)/2 
    984         newYCtr_cm[7] = y_MiddleReference + (0.79 + 0.74)/2 
    985         // MT (duplicate MB) 
    986         newXCtr_cm[6] = newXCtr_cm[7] 
    987         newYCtr_cm[6] = newYCtr_cm[7]    
    988          
    989          
    990         // default value for B 
    991         newXCtr_cm[8] = 50 
    992         newYCtr_cm[8] = 50 
    993  
    994                  
    995         return 
    996 End 
    997  
    998  
    999  
    1000970 
    1001971 
Note: See TracChangeset for help on using the changeset viewer.