Ignore:
Timestamp:
Jun 30, 2017 12:28:55 PM (5 years ago)
Author:
srkline
Message:

cleaning up a lot of the TODO items from the code.

File:
1 edited

Legend:

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

    r1049 r1050  
    1212 
    1313// 
    14 // TODO 
    15 // -- need a way to generate the known, physical dimensions of the slots 
     14//  
     15// x- need a way to generate the known, physical dimensions of the slots 
    1616// Make/O/D/N=5 peak_spacing_mm_ctr 
    1717// peak_spacing_mm_ctr = {-350,-190,0,190,350} (to be filled in with the correct measurements,  
    1818//   possibly different for each panel) 
    1919// 
    20 // -- a 128 point wave "tube_pixel" (=p) is made in V_ArrayToTubes(), and is needed for the WM 
     20// x- a 128 point wave "tube_pixel" (=p) is made in V_ArrayToTubes(), and is needed for the WM 
    2121//   procedures to identify the peak positions. 
    2222// 
    23 // -- fit with either gauss or lor function to get non-integer pixel values for the peak locations 
    24 // 
    25 // -- do I fit each individually to "tweak" the located values, or fit all 5 at once with a  
     23// x- fit with either gauss or lor function to get non-integer pixel values for the peak locations 
     24// 
     25// x- do I fit each individually to "tweak" the located values, or fit all 5 at once with a  
    2626//    custom fit function and guess some good starting values for peak height, location, etc. 
    2727//  
    2828// 
    29 // -- find a way to display all of the results - in a way that can quickly identify any fits 
     29// x- find a way to display all of the results - in a way that can quickly identify any fits 
    3030//    that may be incorrect 
    3131// 
     
    9393// 
    9494 
    95 // TODO 
    96 // -- need a routine to set up the actual measurements of the slot positions 
    97 // 
    98 // 
    99 // TODO 
    100 // -- the slot positioning is different for the L/R and T/B detectors 
     95//  
     96// x- need a routine to set up the actual measurements of the slot positions 
     97// 
     98// 
     99//  
     100// x- the slot positioning is different for the L/R and T/B detectors 
    101101// 
    102102Proc V_SetupSlotDimensions() 
     
    281281        Variable ind 
    282282         
    283 // TODO 
    284 // -- hard-wired for 5 peaks 
     283//  
     284// x- hard-wired for 5 peaks 
    285285 
    286286        Variable ii,lo,hi 
     
    410410 
    411411 
    412  
    413412//¥Duplicate tube1 tube1_mm 
    414413//¥tube1_mm = V_TubePix_to_mm(fit_coef[0][0],fit_coef[1][0],fit_coef[2][0],p) 
    415  
    416  
    417414 
    418415 
     
    722719 
    723720//////////////////////////// 
    724  
     721// 
     722// Main entry - open the panel and go through 
     723// each of the steps for each of the detector panels 
     724// 
    725725Proc V_TubeCoefPanel() : Panel 
    726726        PauseUpdate; Silent 1           // building window... 
     
    763763 
    764764 
     765// a simple display of the refined results 
     766// 
    765767Function V_PeakPlotButton(ba) : ButtonControl 
    766768        STRUCT WMButtonAction &ba 
     
    778780End 
    779781 
    780  
     782// generate the waves and the table 
     783// 
    781784Function V_TableForPeaksButton(ba) : ButtonControl 
    782785        STRUCT WMButtonAction &ba 
     
    794797End 
    795798 
    796  
     799// use the WM procedures to quickly identify the peak position (and height) 
     800// to be used in the refining fits 
     801// 
    797802Function V_IdentifyPeaksButton(ba) : ButtonControl 
    798803        STRUCT WMButtonAction &ba 
     
    810815End 
    811816 
     817// generate the waves and the table 
     818// 
    812819Function V_RefineTableButton(ba) : ButtonControl 
    813820        STRUCT WMButtonAction &ba 
     
    825832End 
    826833 
     834// using the initial peak locations from WM, refine the values 
     835// by fitting each individual peak 
     836// 
    827837Function V_RefinePeaksButton(ba) : ButtonControl 
    828838        STRUCT WMButtonAction &ba 
     
    840850End 
    841851 
     852// finally, with the peak positions, make waves and a table for the  
     853// quadratic coefficients 
     854// 
    842855Function V_QuadFitTableButton(ba) : ButtonControl 
    843856        STRUCT WMButtonAction &ba 
     
    855868End 
    856869 
     870// fit all of the peak positions per tube vs. the actual mm locations to 
     871// obtain the quadratic coefficients 
     872// 
    857873Function V_QuadFitButton(ba) : ButtonControl 
    858874        STRUCT WMButtonAction &ba 
     
    871887 
    872888 
    873  
     889// fill the waves and table with the hard-wired slot positions (mm) 
     890// 
    874891Function V_Setup_MasksButton(ba) : ButtonControl 
    875892        STRUCT WMButtonAction &ba 
     
    888905 
    889906 
    890  
     907// convert the named detector array to 48 individual tube waves 
     908// 
    891909Function V_ArrayToTubesButton(ba) : ButtonControl 
    892910        STRUCT WMButtonAction &ba 
     
    906924 
    907925/////////////////////////// 
    908  
    909  
     926// 
     927// unused - a simple line graph for each tube is much simpler 
     928// 
    910929Window Gizmo_refinedPositions() : GizmoPlot 
    911930        PauseUpdate; Silent 1           // building window... 
     
    946965EndMacro 
    947966 
     967/////////////////////////// 
     968// 
     969// unused - a simple line graph for each tube is much simpler 
     970// 
    948971Window Gizmo_DetPanel() : GizmoPlot 
    949972        PauseUpdate; Silent 1           // building window... 
     
    10091032End 
    10101033 
     1034 
     1035/////////////// 
     1036// 
     1037// An easy way to see the fit results to check if the peak locations all make sense. 
     1038// 
    10111039Window V_PeakResultsGraph() : Graph 
    10121040        PauseUpdate; Silent 1           // building window... 
     
    10281056EndMacro 
    10291057 
    1030  
     1058// 
     1059// cycle through the tubes 
     1060// 
    10311061Function V_TubePeakSetVarProc(sva) : SetVariableControl 
    10321062        STRUCT WMSetVariableAction &sva 
     
    10671097// array is unchanged. Alternatively, the data could be pulled from the RawVSANS folder after a 
    10681098// file catalog operation 
    1069  
     1099// 
    10701100Macro V_CopyDetectorsToRoot() 
    10711101 
     
    10841114End 
    10851115 
     1116// 
     1117// 
    10861118Macro V_SaveDetectorsITX() 
    10871119// binary save makes each wave an individual file. Igor text groups them all into one file. 
Note: See TracChangeset for help on using the changeset viewer.