Ignore:
Timestamp:
May 15, 2015 11:35:18 AM (8 years ago)
Author:
srkline
Message:

some reorganization of the r/w routines to generate HDF test files for SANS and VSANS (all are housed together for testing). also some reorganization of the detector binning routines to get functions grouped in more logical locations.

File:
1 edited

Legend:

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

    r954 r955  
    22 
    33 
    4 ///// Procedures for: 
    5 //      Generating the detector panels 
    6 //      Filling the panels with Qtot, QxQyQz 
    7 // Filling the "data" with a model function 
    8 // Averaging the panels (independently) into I(Q) 
    9 // 
    10 // 
    11 //There are some things in the current circular averaging that don't make any sense 
    12 //and don't seem to really do anything at all, so trim them out. 
    13 //1) subdividing pixels near the beam stop into 9 sub-pixels 
    14 //2) non-linear correction (maybe keep this as a dummy). I may need to put some sort 
    15 //of correction here for the offset, or it may already be done as I receive it. 
    16 // 
    17 // 
    18 // 
    19 //Do I separate out the circular, sector, rectangular, annular averaging into 
    20 //separate routines?  
    21 // 
    22 // 
    23 // 
     4////////////////// 
     5//  
     6// Procedures for: 
     7// 
     8//              Gathering information to calculate QxQyQz 
     9//              Filling the panels with Qtot, QxQyQz 
     10//              Filling the "data" with a model function 
     11//              Averaging the panels (independently) into I(Q) 
     12//              Plotting the 9 detector panels in 2D 
     13//              Plotting the 1D I(q) data depending on the panel combinations 
     14// 
     15// 
     16//  There are some things in the current circular averaging that don't make any sense 
     17//  and don't seem to really do anything at all, so i have decided to trim them out. 
     18//  1) subdividing pixels near the beam stop into 9 sub-pixels 
     19//  2) non-linear correction (only applies to Ordela) 
     20// 
     21// 
     22//  Do I separate out the circular, sector, rectangular, annular averaging into 
     23//   separate routines?  
     24// 
     25// 
     26// 
     27/////////////////// 
    2428 
    2529 
     
    2832End 
    2933 
    30 // to plot I(q) for the 4 front panels 
     34// 
     35// Plot the front panels in 2D and 1D 
     36//              calcualate Q 
     37//              fill w/model data 
     38//              "shadow" the T/B detectors 
     39//              bin the data to I(q) 
     40//              draw I(q) graph 
     41//              draw 2D panel graph 
    3142// 
    3243// *** Call this function when front panels are adjusted, or wavelength, etc. changed 
     
    5667        FillPanel_wModelData(det_FT,qTot_FT,"FT") 
    5768        FillPanel_wModelData(det_FB,qTot_FB,"FB") 
    58 //      det_FL = V_SphereForm(1,60,1e-6,1,qTot_FL[p][q])                                 
    59 //      det_FR = V_SphereForm(1,60,1e-6,1,qTot_FR[p][q])                                 
    60 //      det_FT = V_SphereForm(1,60,1e-6,1,qTot_FT[p][q])                                 
    61 //      det_FB = V_SphereForm(1,60,1e-6,1,qTot_FB[p][q])                         
    6269 
    6370        SetDataFolder root: 
     
    7683        Execute "Front_IQ_Graph()" 
    7784        Execute "FrontPanels_AsQ()" 
     85         
     86        return(0) 
    7887End 
    7988 
     
    218227 
    219228 
    220 // TODO" - this doesn't quite mask things out as they should be (too much is masked L/R of center) 
     229// TODO - this doesn't quite mask things out as they should be (too much is masked L/R of center) 
    221230// and the outer edges of the detector are masked even if the TB panels extend past the TB of the LR panels. 
    222231// ? skip the masking? but then I bin the detector data directly to get I(q), skipping the masked NaN values... 
     
    245254// TODO - these are to be set from globals, not hard-wired 
    246255// pixel sizes are in cm for T/B detector 
    247 // TODO: the "FT" check is hard wired for FRONT -- get rid of this... 
     256// TODO - the "FT" check is hard wired for FRONT -- get rid of this... 
    248257 
    249258        pixSizeX = VCALC_getPixSizeX(type) 
     
    266275 
    267276 
     277// After the panels have been calculated and rescaled in terms of Q, and filled with simulated data 
     278// they can be appended to the subwindow. If they are already there, the axes and coloring 
     279// are rescaled as needed 
     280// 
    268281Window FrontPanels_AsQ() : Graph 
    269 //      DoWindow/F FrontPanels_AsQ 
    270 //      if(V_flag == 0) 
    271 //      PauseUpdate; Silent 1           // building window... 
    272 //      Display /W=(1477,44,1978,517) 
    273282 
    274283        SetDataFolder root:Packages:NIST:VSANS:VCALC:Front 
     
    303312        SetDataFolder root: 
    304313         
    305 //      ModifyGraph width={Aspect,1},height={Aspect,1},gbRGB=(56797,56797,56797) 
    306 //      ModifyGraph grid=2 
    307 //      ModifyGraph mirror=2 
    308 //      SetAxis left -0.2,0.2 
    309 //      SetAxis bottom -0.2,0.2 
    310 //      endif 
    311314EndMacro 
    312315 
     
    419422        Execute "Middle_IQ_Graph()" 
    420423        Execute "MiddlePanels_AsQ()" 
     424         
     425        return(0) 
    421426End 
    422427 
     
    805810        Execute "Back_IQ_Graph()" 
    806811        Execute "BackPanels_AsQ()" 
     812 
     813        return(0) 
     814 
    807815End 
    808816 
Note: See TracChangeset for help on using the changeset viewer.