Ignore:
Timestamp:
Feb 21, 2017 1:03:50 PM (6 years ago)
Author:
srkline
Message:

minor changes to prefix functions with "V_" to avoid conflicts with non-VSANS functions.

File:
1 edited

Legend:

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

    r1023 r1024  
    2222                NewDataFolder/O root:Packages:NIST:VSANS:Globals:BeamCenter 
    2323 
    24                 Execute "DetectorPanelFit()" 
     24                Execute "V_DetectorPanelFit()" 
    2525        endif 
    2626End 
     
    2929//      ModifyGraph width={Plan,1,bottom,left} 
    3030// 
    31 Proc DetectorPanelFit() : Panel 
     31Proc V_DetectorPanelFit() : Panel 
    3232        PauseUpdate; Silent 1           // building window... 
    3333 
    3434// plot the default model to be sure some data is present 
    3535        if(exists("xwave_PeakPix2D") == 0) 
    36                 PlotBroadPeak_Pix2D() 
     36                V_PlotBroadPeak_Pix2D() 
    3737        endif 
    3838 
     
    4040//      ShowTools/A 
    4141         
    42         PopupMenu popup_0,pos={20,50},size={109,20},proc=SetDetPanelPopMenuProc,title="Detector Panel" 
     42        PopupMenu popup_0,pos={20,50},size={109,20},proc=V_SetDetPanelPopMenuProc,title="Detector Panel" 
    4343        PopupMenu popup_0,mode=1,popvalue="FL",value= #"\"FL;FR;FT;FB;ML;MR;MT;MB;B;\"" 
    44         PopupMenu popup_1,pos={200,20},size={157,20},proc=DetModelPopMenuProc,title="Model Function" 
     44        PopupMenu popup_1,pos={200,20},size={157,20},proc=V_DetModelPopMenuProc,title="Model Function" 
    4545        PopupMenu popup_1,mode=1,popvalue="BroadPeak",value= #"\"BroadPeak;other;\"" 
    4646        PopupMenu popup_2,pos={20,20},size={109,20},title="Data Source"//,proc=SetFldrPopMenuProc 
    4747        PopupMenu popup_2,mode=1,popvalue="RAW",value= #"\"RAW;SAM;VCALC;\"" 
    4848                 
    49         Button button_0,pos={486,20},size={80,20},proc=DetFitGuessButtonProc,title="Guess" 
    50         Button button_1,pos={615,20},size={80,20},proc=DetFitButtonProc,title="Do Fit" 
    51         Button button_2,pos={744,20},size={80,20},proc=DetFitHelpButtonProc,title="Help" 
    52         Button button_3,pos={615,400},size={110,20},proc=WriteCtrButtonProc,title="Write Centers" 
    53         Button button_4,pos={730,400},size={110,20},proc=CtrTableButtonProc,title="Ctr table" 
    54         Button button_5,pos={730,440},size={110,20},proc=WriteCtrTableButtonProc,title="Write table" 
     49        Button button_0,pos={486,20},size={80,20},proc=V_DetFitGuessButtonProc,title="Guess" 
     50        Button button_1,pos={615,20},size={80,20},proc=V_DetFitButtonProc,title="Do Fit" 
     51        Button button_2,pos={744,20},size={80,20},proc=V_DetFitHelpButtonProc,title="Help" 
     52        Button button_3,pos={615,400},size={110,20},proc=V_WriteCtrButtonProc,title="Write Centers" 
     53        Button button_4,pos={730,400},size={110,20},proc=V_CtrTableButtonProc,title="Ctr table" 
     54        Button button_5,pos={730,440},size={110,20},proc=V_WriteCtrTableButtonProc,title="Write table" 
    5555 
    5656 
     
    6464         
    6565        // draw the correct images 
    66         DrawDetPanel("FL") 
     66        V_DrawDetPanel("FL") 
    6767 
    6868         
     
    106106// function to choose which detector panel to display, and then to actually display it 
    107107// 
    108 Function SetDetPanelPopMenuProc(pa) : PopupMenuControl 
     108Function V_SetDetPanelPopMenuProc(pa) : PopupMenuControl 
    109109        STRUCT WMPopupAction &pa 
    110110 
     
    130130         
    131131                        // draw the correct images 
    132                         DrawDetPanel(popStr) 
     132                        V_DrawDetPanel(popStr) 
    133133                         
    134134                        break 
     
    152152// draw the selected panel and the model calculation, adjusting for the  
    153153// orientation of the panel and the number of pixels, and pixel sizes 
    154 Function DrawDetPanel(str) 
     154Function V_DrawDetPanel(str) 
    155155        String str 
    156156         
     
    349349        // re-dimension the model calculation to be the proper dimensions        
    350350        Redimension/N=(nPix_X*nPix_Y) xwave_PeakPix2D, ywave_PeakPix2D,zwave_PeakPix2D   
    351         FillPixTriplet(xwave_PeakPix2D, ywave_PeakPix2D,zwave_PeakPix2D,nPix_X,nPix_Y) 
     351        V_FillPixTriplet(xwave_PeakPix2D, ywave_PeakPix2D,zwave_PeakPix2D,nPix_X,nPix_Y) 
    352352        Make/O/D/N=(nPix_X,nPix_Y) PeakPix2D_mat                // use the point scaling of the matrix (=pixels) 
    353353 
     
    376376// Function to plot the specified 2D model for the detector 
    377377// 
    378 Function DetModelPopMenuProc(pa) : PopupMenuControl 
     378Function V_DetModelPopMenuProc(pa) : PopupMenuControl 
    379379        STRUCT WMPopupAction &pa 
    380380 
     
    384384                        String popStr = pa.popStr 
    385385                         
    386                         Execute "PlotBroadPeak_Pix2D()" 
     386                        Execute "V_PlotBroadPeak_Pix2D()" 
    387387                         
    388388                        break 
     
    398398// TODO - make a better guess (how?) 
    399399// 
    400 Function DetFitGuessButtonProc(ba) : ButtonControl 
     400Function V_DetFitGuessButtonProc(ba) : ButtonControl 
    401401        STRUCT WMButtonAction &ba 
    402402 
     
    423423// 
    424424// -- will need to recalc mm center AND q-values 
    425 Function WriteCtrButtonProc(ba) : ButtonControl 
     425Function V_WriteCtrButtonProc(ba) : ButtonControl 
    426426        STRUCT WMButtonAction &ba 
    427427 
     
    459459// function to call the fit function (2D) 
    460460// 
    461 Function DetFitButtonProc(ba) : ButtonControl 
     461Function V_DetFitButtonProc(ba) : ButtonControl 
    462462        STRUCT WMButtonAction &ba 
    463463 
     
    469469                        Wave coefW=root:coef_PeakPix2D 
    470470                         
    471                         FuncFitMD/H="11000111100"/NTHR=0 BroadPeak_Pix2D coefW  dispW /D                         
     471                        FuncFitMD/H="11000111100"/NTHR=0 V_BroadPeak_Pix2D coefW  dispW /D                       
    472472                         
    473473                        Wave ws=W_sigma 
     
    482482End 
    483483 
    484 Function DetFitHelpButtonProc(ba) : ButtonControl 
     484Function V_DetFitHelpButtonProc(ba) : ButtonControl 
    485485        STRUCT WMButtonAction &ba 
    486486 
     
    499499End 
    500500 
    501 Function CtrTableButtonProc(ba) : ButtonControl 
     501Function V_CtrTableButtonProc(ba) : ButtonControl 
    502502        STRUCT WMButtonAction &ba 
    503503 
     
    516516End 
    517517 
    518 Function WriteCtrTableButtonProc(ba) : ButtonControl 
     518Function V_WriteCtrTableButtonProc(ba) : ButtonControl 
    519519        STRUCT WMButtonAction &ba 
    520520 
Note: See TracChangeset for help on using the changeset viewer.