Changeset 1131


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

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

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
Files:
6 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 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_BroadPeak_Pix_2D.ipf

    r1119 r1131  
    3232        Prompt yDim "Enter Y dimension: " 
    3333                 
    34         Make/O/D coef_PeakPix2D = {10, 3, 10, 0.3, 10, 2, 0.1, 8, 8, 100, 100} 
     34        Make/O/D coef_PeakPix2D = {0, 3, 100, 0.5, 25, 2, 10, 8, 8, -10, 64} 
    3535//      Make/O/D tmp_Pix2D =    {10, 3, 10, 0.3, 10, 2, 0.1}            //without the pixel ctrs                                         
    3636        make/o/t parameters_PeakPix2D = {"Porod Scale", "Porod Exponent","Lorentzian Scale","Lor Screening Length","Peak position","Lorentzian Exponent","Bgd [1/cm]", "xPix size (mm)","yPix size (mm)", "xCtr (pixels)", "yCtr (pixels)"}              
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf

    r1117 r1131  
    2222//************************ 
    2323 
    24  
     24Constant kVSANSVersion = 7.88 
    2525 
    2626// TODO -- need to set up a separate file of "constants" or "globals" where the actual numbers are 
     
    126126Proc V_Initialize() 
    127127 
    128         Variable curVersion = 0.1 
     128        Variable curVersion = kVSANSVersion 
    129129        Variable oldVersion = NumVarOrDefault("root:VSANS_RED_VERSION",curVersion) 
    130130                 
    131131        if(oldVersion == curVersion) 
    132132                //must just be a new startup with the current version 
    133                 Variable/G root:VSANS_RED_VERSION=0.1 
     133                Variable/G root:VSANS_RED_VERSION=kVSANSVersion 
    134134        endif 
    135135         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf

    r1101 r1131  
    373373Window Main_VSANS_Panel() 
    374374        PauseUpdate; Silent 1           // building window... 
    375         NewPanel /W=(500,60,924,320) /K=2 as "VSANS Reduction Controls" 
     375        NewPanel /W=(500,60,924,320) /K=2 as "VSANS Reduction Controls" + " " + num2str(kVSANSVersion) 
    376376        ModifyPanel cbRGB=(49694,61514,27679) 
    377377        ModifyPanel fixedSize=1 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Marquee_Operations.ipf

    r1119 r1131  
    365365                 
    366366// if measured on the LEFT panel, convert to the RIGHT coordinates for the reference value       
    367 // these corrections are exactly the opposite of what is done in V_fDeriveBeamCenters(xFR,yFR,xMR,yMR) 
     367// these corrections are exactly the opposite (subtract, not add) of what is done in V_fDeriveBeamCenters(xFR,yFR,xMR,yMR) 
    368368                if(cmpstr(detStr,"FL") == 0) 
    369 //                      Print "FRONT Reference X-center (cm) (Velocity Selector) = ",x_mm/10 + (0.03 + 0.03)/2   // OLD pre Dec 2018 
    370 //                      Print "FRONT Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 - (0.34 + 0.32)/2 
    371                         Print "FRONT Reference X-center (cm) (Velocity Selector) = ",x_mm/10 - 0.13     // NEW Dec 2018 values 
    372                         Print "FRONT Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 - 0.35 
    373                                                  
    374         //              Print "FRONT Reference X-center (cm) (Graphite) = ",x_mm/10 + 0.03 
    375         //              Print "FRONT Reference Y-center (cm) (Graphite) = ",y_mm/10 - 0.28 
     369                        Print "FRONT Reference X-center (cm) (Velocity Selector) = ",x_mm/10 - kBCtrOffset_FL_x         // NEW Dec 2018 values 
     370                        Print "FRONT Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 - kBCtrOffset_FL_y 
    376371                endif 
    377372                 
    378373                if(cmpstr(detStr,"ML") == 0) 
    379 //                      Print "MIDDLE Reference X-center (cm) (Velocity Selector) = ",x_mm/10 + (0.06 + 0.05)/2 
    380 //                      Print "MIDDLE Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 - (0.14 + 0.01)/2 
    381                         Print "MIDDLE Reference X-center (cm) (Velocity Selector) = ",x_mm/10 - 0.26 
    382                         Print "MIDDLE Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 + 0.16 
    383                                          
    384         //              Print "MIDDLE Reference X-center (cm) (Graphite) = ",x_mm/10 + (0.06 + 0.05)/2 
    385         //              Print "MIDDLE Reference Y-center (cm) (Graphite) = ",y_mm/10 - (0.14 + 0.01)/2 
     374                        Print "MIDDLE Reference X-center (cm) (Velocity Selector) = ",x_mm/10 - kBCtrOffset_ML_x 
     375                        Print "MIDDLE Reference Y-center (cm) (Velocity Selector) = ",y_mm/10 - kBCtrOffset_ML_y 
    386376                endif 
    387377        endif 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf

    r1126 r1131  
    2929                "Trim I(q) points",V_CombineDataGraph() 
    3030                "-" 
    31                 "Derive Beam Centers - VelSel",V_DeriveBeamCenters_VelSel() 
    32 //              "Derive Beam Centers - Graphite",V_DeriveBeamCenters_Graphite() 
     31                "Derive Beam Centers From Reference",V_DeriveBeamCenters_VelSel() 
    3332                "-" 
    3433                "Back Detector Saturation",Vm_NumberSaturated() 
Note: See TracChangeset for help on using the changeset viewer.