Ignore:
Timestamp:
Mar 11, 2016 3:36:43 PM (7 years ago)
Author:
srkline
Message:

lots of changes to 1D averaging and the plotting routines, detector corrections, and basic reads

File:
1 edited

Legend:

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

    r982 r984  
    1717        if(V_flag==0) 
    1818                Execute "V_DrawPlotPanel()" 
     19        else 
     20                SVAR type = root:Packages:NIST:VSANS:Globals:gCurDispType 
     21 
     22                V_QBinAllPanels(type) 
     23 
     24        // TODO: 
     25        // x- "B" detector is currently skipped - Q is not yet calculated 
     26                Execute ("V_Back_IQ_Graph(\""+type+"\")") 
     27                Execute ("V_Middle_IQ_Graph(\""+type+"\")") 
     28                Execute ("V_Front_IQ_Graph(\""+type+"\")") 
    1929        endif 
    2030End 
     
    4151        V_QBinAllPanels(type) 
    4252 
    43 // TODO "B" detector is currently skipped - Q is not yet calculated 
    44 //      V_Back_IQ_Graph() 
     53// TODO  
     54// x- "B" detector is currently skipped - Q is not yet calculated 
     55        V_Back_IQ_Graph(type) 
    4556        V_Middle_IQ_Graph(type) 
    4657        V_Front_IQ_Graph(type) 
     
    5465// 
    5566// TODO  
    56 // -- detector "B" is currently skipped since the calibration waves are not faked 
     67// x- detector "B" is currently skipped since the calibration waves are not faked 
    5768//    when the raw data is loaded. Then the qxqyqz waves are not generated. 
     69// 
     70// -- REDO the logic here. It's a mess, and will get the calculation wrong  
     71// 
    5872// -- figure out the binning type (where is it set?) 
    5973// -- binning type is HARD-WIRED 
     
    7286         
    7387 
    74 //// TODO -- currently the "B" detector is skipped - it was skipped in  
     88//// TODO: 
     89// x- currently the "B" detector is skipped - it was skipped in  
    7590//       previous functions where q values are calculated        
    7691//       
    77 //      delQ = SetDeltaQ("RAW","B") 
    78 //       
    79 //      // dispatch based on binning type 
    80 //      if(binType == 4) 
    81 //              VC_fDoBinning_QxQy2D("RAW", "B")                //normal binning, nothing to combine 
    82 //      endif 
    83 // 
    84 //// TODO -- this is only a temporary fix for slit mode  
    85 //      if(binType == 4) 
    86 //              /// this is for a tall, narrow slit mode         
    87 //              VC_fBinDetector_byRows("VCALC","B") 
    88 //      endif    
     92        delQ = SetDeltaQ(folderStr,"B") 
     93         
     94        // dispatch based on binning type 
     95        if(binType == 1) 
     96                VC_fDoBinning_QxQy2D(folderStr, "B")            //normal binning, nothing to combine 
     97        endif 
     98 
     99// TODO -- this is only a temporary fix for slit mode    
     100        if(binType == 4) 
     101                /// this is for a tall, narrow slit mode         
     102                VC_fBinDetector_byRows(folderStr,"B") 
     103        endif    
    89104 
    90105// these are the binning types where detectors are not combined 
     
    384399 
    385400 
    386  
     401// TODO 
     402// -- need to set binType 
     403// -- currently  hard-wired == 1 
     404// 
     405////////////to plot the back panel I(q) 
     406Proc V_Back_IQ_Graph(type) 
     407        String type 
     408         
     409        SetDataFolder root:Packages:NIST:VSANS:VCALC:entry:entry:instrument:detector_B 
     410 
     411        Variable binType 
     412         
     413//      ControlInfo/W=VCALC popup_b 
     414//      binType = V_Value               // V_value counts menu items from 1, so 1=1, 2=2, 3=4 
     415 
     416        bintype = 1 
     417         
     418                SetDataFolder $("root:Packages:NIST:VSANS:"+type)        
     419 
     420        if(binType==1 || binType==2 || binType==3) 
     421                 
     422                CheckDisplayed/W=V_1D_Data iBin_qxqy_B 
     423                 
     424                if(V_flag==0) 
     425                        AppendtoGraph/W=V_1D_Data iBin_qxqy_B vs qBin_qxqy_B 
     426                        ModifyGraph/W=V_1D_Data mode=4 
     427                        ModifyGraph/W=V_1D_Data marker=19 
     428                        ModifyGraph/W=V_1D_Data rgb(iBin_qxqy_B)=(1,52428,52428) 
     429                        ModifyGraph/W=V_1D_Data msize=2 
     430                        ModifyGraph/W=V_1D_Data grid=1 
     431                        ModifyGraph/W=V_1D_Data log=1 
     432                        ModifyGraph/W=V_1D_Data mirror=2 
     433                endif 
     434        endif 
     435 
     436        //nothing different here since there is ony a single detector to display, but for the future... 
     437        if(binType==4) 
     438                 
     439                CheckDisplayed/W=V_1D_Data iBin_qxqy_B 
     440                 
     441                if(V_flag==0) 
     442                        AppendtoGraph/W=V_1D_Data iBin_qxqy_B vs qBin_qxqy_B 
     443                        ModifyGraph/W=V_1D_Data mode=4 
     444                        ModifyGraph/W=V_1D_Data marker=19 
     445                        ModifyGraph/W=V_1D_Data rgb(iBin_qxqy_B)=(1,52428,52428) 
     446                        ModifyGraph/W=V_1D_Data msize=2 
     447                        ModifyGraph/W=V_1D_Data grid=1 
     448                        ModifyGraph/W=V_1D_Data log=1 
     449                        ModifyGraph/W=V_1D_Data mirror=2 
     450                endif 
     451        endif 
     452 
     453         
     454        SetDataFolder root: 
     455End 
     456 
Note: See TracChangeset for help on using the changeset viewer.