Ignore:
Timestamp:
Feb 9, 2018 3:47:28 PM (5 years ago)
Author:
srkline
Message:

minor changes to allow patching of more incorrect metadata

added simple way to estimate beam centers from a single measurement (stiil to be thoroughly verified!)

File:
1 edited

Legend:

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

    r1064 r1083  
    838838         
    839839End 
     840 
     841 
     842 
     843 
     844////////////////// 
     845// 
     846// Simple utility to calculate beam centers [cm] based on a single measurement 
     847//  and empirical relations between the panel zero positions 
     848// 
     849// Empirical relations are derived from beam center measurements using 6A data and WB data (9/10/17) 
     850// only measurements on L, R, and x-coordinate of B were used. T panel cannot be translated down far enough 
     851// to reach the direct beam. 
     852// 
     853// Start with the (default) case of a beam center measured on R (MR or FR) 
     854// 
     855// Empirical values are averaged as noted 
     856// 
     857 
     858Proc V_DeriveBeamCenters() 
     859 
     860        Make/O/T panelWave = {"FL","FR","FT","FB","ML","MR","MT","MB","B"} 
     861        Make/O/D/N=9 newXCtr_cm,newYCtr_cm 
     862         
     863        Edit panelWave,newXCtr_cm,newYCtr_cm 
     864         
     865        DoAlert 0, "enter the measured beam center for FR and MR panels" 
     866        V_fDeriveBeamCenters() 
     867         
     868End 
     869 
     870 
     871Proc V_fDeriveBeamCenters(xFR,yFR,xMR,yMR) 
     872        Variable xFR,yFR,xMR,yMR 
     873         
     874        // start with the front 
     875        // FR 
     876        newXCtr_cm[1] = xFR 
     877        newYCtr_cm[1] = yFR 
     878        // FL 
     879        newXCtr_cm[0] = xFR - (0.03 + 0.03)/2 
     880        newYCtr_cm[0] = yFR + (0.34 + 0.32)/2 
     881        // FB 
     882        newXCtr_cm[3] = xFR - (2.02 + 2.06)/2 
     883        newYCtr_cm[3] = yFR - (0.12 + 0.19)/2 
     884        // FT (duplicate FB) 
     885        newXCtr_cm[2] = newXCtr_cm[3] 
     886        newYCtr_cm[2] = newYCtr_cm[3] 
     887         
     888        // MR 
     889        newXCtr_cm[5] = xMR 
     890        newYCtr_cm[5] = yMR 
     891        // ML 
     892        newXCtr_cm[4] = xMR - (0.06 + 0.05)/2 
     893        newYCtr_cm[4] = yMR + (0.14 + 0.01)/2 
     894        // MB 
     895        newXCtr_cm[7] = xMR - (0.51 + 0.62)/2 
     896        newYCtr_cm[7] = yMR + (0.79 + 0.74)/2 
     897        // MT (duplicate MB) 
     898        newXCtr_cm[6] = newXCtr_cm[7] 
     899        newYCtr_cm[6] = newYCtr_cm[7]    
     900         
     901         
     902        // dummy value for B 
     903        newXCtr_cm[8] = 50 
     904        newYCtr_cm[8] = 50 
     905 
     906                 
     907        return 
     908End 
Note: See TracChangeset for help on using the changeset viewer.