Ignore:
Timestamp:
Sep 23, 2015 8:24:30 AM (7 years ago)
Author:
srkline
Message:

Updated the display of the "beam center finder" to better display the panels with an appropriate aspect ratio for the pixels.

Made the number of pixels (x,y) on each of the panels as globals, plus access functions. Large panels were coded for 256, but will likely be 128 pixels in reality. Make global for easy changes. Made sure that exsting functions used the global and were not hard-wired.

File:
1 edited

Legend:

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

    r958 r963  
    647647        SetDataFolder root:Packages:NIST:VSANS:VCALC 
    648648         
    649         Make/O/D/N=2 fpx1,fpy1,mpx1,mpy1                // for display of the detector panels 
    650         Make/O/D/N=2 fv_degX,fv_degY 
    651  
    652 // to fill in: 
    653 // values for always-visible items 
    654         String/G gPresetPopStr = "Low Q;High Q;Converging Pinholes;Narrow Slit Aperture;Converging Slits;White Beam;Polarizer;" 
    655         String/G gBinTypeStr = "One;Two;Four;Slit Mode;" 
    656649 
    657650///// FRONT DETECTOR BANKS 
     
    667660// detector resolution (xy for each bank!) 
    668661        Variable/G gFront_L_pixelX = 0.8                        // (cm)         these tubes are vertical 
    669         Variable/G gFront_L_pixelY = 0.4                        // (cm) 
     662        Variable/G gFront_L_pixelY = 0.8                        // (cm)         //!! now 8 mm, since nPix=128, rather than 256 
    670663        Variable/G gFront_R_pixelX = 0.8                        // (cm) 
    671         Variable/G gFront_R_pixelY = 0.4                        // (cm) 
     664        Variable/G gFront_R_pixelY = 0.8                        // (cm) 
    672665         
    673666        Variable/G gFront_T_pixelX = 0.4                        // (cm)         these tubes are horizontal 
     
    677670         
    678671// number of pixels in each bank (this can be modified at acquisition time, so it must be adjustable here) 
    679 // allocate the detector arrays (+2D Q) 
     672        Variable/G gFront_L_nPix_X = 48         // == number of tubes 
     673        Variable/G gFront_L_nPix_Y = 128                // == pixels in vertical direction (was 256, John says likely will run @ 128 9/2015) 
     674        Variable/G gFront_R_nPix_X = 48         // == number of tubes 
     675        Variable/G gFront_R_nPix_Y = 128                // == pixels in vertical direction  
     676        Variable/G gFront_T_nPix_X = 128                // == pixels in horizontal direction 
     677        Variable/G gFront_T_nPix_Y = 48         // == number of tubes 
     678        Variable/G gFront_B_nPix_X = 128                // == pixels in horizontal direction 
     679        Variable/G gFront_B_nPix_Y = 48         // == number of tubes 
     680 
     681 
    680682 
    681683 
     
    690692// detector resolution (xy for each bank!) 
    691693        Variable/G gMiddle_L_pixelX = 0.8                       // (cm)         these tubes are vertical 
    692         Variable/G gMiddle_L_pixelY = 0.4                       // (cm) 
     694        Variable/G gMiddle_L_pixelY = 0.8               // (cm) 
    693695        Variable/G gMiddle_R_pixelX = 0.8                       // (cm) 
    694         Variable/G gMiddle_R_pixelY = 0.4                       // (cm) 
     696        Variable/G gMiddle_R_pixelY = 0.8               // (cm) 
    695697         
    696698        Variable/G gMiddle_T_pixelX = 0.4                       // (cm)         these tubes are horizontal 
     
    698700        Variable/G gMiddle_B_pixelX = 0.4                       // (cm) 
    699701        Variable/G gMiddle_B_pixelY = 0.8                       // (cm) 
     702 
     703// number of pixels in each bank (this can be modified at acquisition time, so it must be adjustable here) 
     704        Variable/G gMiddle_L_nPix_X = 48                // == number of tubes 
     705        Variable/G gMiddle_L_nPix_Y = 128               // == pixels in vertical direction (was 256, John says likely will run @ 128 9/2015) 
     706        Variable/G gMiddle_R_nPix_X = 48                // == number of tubes 
     707        Variable/G gMiddle_R_nPix_Y = 128               // == pixels in vertical direction  
     708        Variable/G gMiddle_T_nPix_X = 128               // == pixels in horizontal direction 
     709        Variable/G gMiddle_T_nPix_Y = 48                // == number of tubes 
     710        Variable/G gMiddle_B_nPix_X = 128               // == pixels in horizontal direction 
     711        Variable/G gMiddle_B_nPix_Y = 48                // == number of tubes 
     712 
     713 
    700714 
    701715 
     
    706720        Variable/G gBack_pixelX = 0.1           // 1mm resolution (units of cm here) 
    707721        Variable/G gBack_pixelY = 0.1 
     722        Variable/G gBack_nPix_X = 320           // detector pixels in x-direction 
     723        Variable/G gBack_nPix_Y = 320    
    708724 
    709725 
     
    714730        SetDataFolder root:Packages:NIST:VSANS:VCALC:Front 
    715731 
    716         Make/O/D/N=(48,256) det_FL,det_FR 
    717         Make/O/D/N=(128,48) det_FT,det_FB 
     732        Make/O/D/N=(::gFront_L_nPix_X,::gFront_L_nPix_Y) det_FL 
     733        Make/O/D/N=(::gFront_R_nPix_X,::gFront_R_nPix_Y) det_FR 
     734        Make/O/D/N=(::gFront_T_nPix_X,::gFront_T_nPix_Y) det_FT 
     735        Make/O/D/N=(::gFront_B_nPix_X,::gFront_B_nPix_Y) det_FB 
    718736        Duplicate/O det_FL qTot_FL,qx_FL,qy_FL,qz_FL 
    719737        Duplicate/O det_FR qTot_FR,qx_FR,qy_FR,qz_FR 
     
    725743        SetDataFolder root:Packages:NIST:VSANS:VCALC:Middle 
    726744 
    727         Make/O/D/N=(48,256) det_ML,det_MR 
    728         Make/O/D/N=(128,48) det_MT,det_MB 
     745        Make/O/D/N=(::gMiddle_L_nPix_X,::gMiddle_L_nPix_Y) det_ML 
     746        Make/O/D/N=(::gMiddle_R_nPix_X,::gMiddle_R_nPix_Y) det_MR 
     747        Make/O/D/N=(::gMiddle_T_nPix_X,::gMiddle_T_nPix_Y) det_MT 
     748        Make/O/D/N=(::gMiddle_B_nPix_X,::gMiddle_B_nPix_Y) det_MB 
    729749        Duplicate/O det_ML qTot_ML,qx_ML,qy_ML,qz_ML 
    730750        Duplicate/O det_MR qTot_MR,qx_MR,qy_MR,qz_MR 
     
    736756        SetDataFolder root:Packages:NIST:VSANS:VCALC:Back 
    737757         
    738         Make/O/D/N=(320,320) det_B 
     758        Make/O/D/N=(::gBack_nPix_X,::gBack_nPix_Y) det_B 
    739759        Duplicate/O det_B qTot_B,qx_B,qy_B,qz_B 
    740760 
    741761 
     762 
     763 
    742764////////////    FOR THE PANEL 
    743765 
    744766        SetDataFolder root:Packages:NIST:VSANS:VCALC 
     767 
     768        Make/O/D/N=2 fpx1,fpy1,mpx1,mpy1                // for display of the detector panels 
     769        Make/O/D/N=2 fv_degX,fv_degY 
     770 
     771 
     772// to fill in: 
     773// values for always-visible items 
     774        String/G gPresetPopStr = "Low Q;High Q;Converging Pinholes;Narrow Slit Aperture;Converging Slits;White Beam;Polarizer;" 
     775        String/G gBinTypeStr = "One;Two;Four;Slit Mode;" 
     776 
     777 
     778 
    745779 
    746780// popup strings for each tab (then use the string in the panel) 
Note: See TracChangeset for help on using the changeset viewer.