Ignore:
Timestamp:
Mar 12, 2020 6:23:22 PM (2 years ago)
Author:
srkline
Message:

added some test procedures to make it easier to calculate and patch the corrected beam center to a series of files. This new method can be found under the VSANS menu.

Changed the mask drawing objects to be semi-transparent to allow easier masking of bad spots - since you can see what you're doing now.

File:
1 edited

Legend:

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

    r1242 r1243  
    275275End 
    276276 
    277 Function V_FindCentroid() :  GraphMarquee 
     277 
     278 
     279Function V_Find_BeamCentroid() :  GraphMarquee 
    278280 
    279281//      //get the current displayed data (so the correct folder is used) 
     
    284286        Variable left,right,bottom,top,ii,jj,counts 
    285287        Variable x_mm_sum,y_mm_sum,x_mm,y_mm 
     288        Variable xRef,yRef 
    286289 
    287290         
     
    383386                        Print "FRONT Reference X-center (cm) = ",x_mm/10 
    384387                        Print "FRONT Reference Y-center (cm) = ",y_mm/10 + yCorrection*yPixSize 
     388                        xRef = x_mm/10 
     389                        yRef = y_mm/10 + yCorrection*yPixSize 
    385390                endif 
    386391 
     
    393398                        Print "MIDDLE Reference X-center (cm) = ",x_mm/10 
    394399                        Print "MIDDLE Reference Y-center (cm) = ",y_mm/10 + yCorrection*yPixSize 
     400                        xRef = x_mm/10 
     401                        yRef = y_mm/10 + yCorrection*yPixSize 
    395402                endif 
    396403                 
     
    400407                        Print "FRONT Reference X-center (cm) = ",x_mm/10 - kBCtrOffset_FL_x     // NEW Dec 2018 values 
    401408                        Print "FRONT Reference Y-center (cm) = ",y_mm/10 - kBCtrOffset_FL_y 
     409                        xRef = x_mm/10 - kBCtrOffset_FL_x 
     410                        yRef = y_mm/10 - kBCtrOffset_FL_y 
    402411                endif 
    403412                 
     
    405414                        Print "MIDDLE Reference X-center (cm) = ",x_mm/10 - kBCtrOffset_ML_x 
    406415                        Print "MIDDLE Reference Y-center (cm) = ",y_mm/10 - kBCtrOffset_ML_y 
    407                 endif 
    408         endif 
     416                        xRef = x_mm/10 - kBCtrOffset_ML_x 
     417                        yRef = y_mm/10 - kBCtrOffset_ML_y 
     418                endif 
     419        endif 
     420 
     421// TODO 
     422// ?? store the xy reference values somewhere so that the conversion to proper 
     423// beam center values can be done automatically, rather than copying numbers into a procedure 
     424// 
     425// - either I need 6 globals for the three panels, or I need to store the values in the  
     426// reduction block of the file (comment?) - but I don't have the fileName here - could I find it 
     427// somewhere? gFileList in the current data folder? 
     428// 
     429        String ctrStr="" 
     430        if(cmpstr(detStr,"B") == 0) 
     431                xRef = xCtr 
     432                yRef = yCtr                     //these are in pixels 
     433        endif 
     434        sprintf ctrStr,"XREF=%g;YREF=%g;",xRef,yRef 
     435        SVAR gFileList = $("root:Packages:NIST:VSANS:"+gCurDispType+":gFileList") 
     436         
     437        V_writeReductionComments(gFileList,ctrStr) 
     438         
     439         
    409440         
    410441        //back to root folder (redundant) 
Note: See TracChangeset for help on using the changeset viewer.