Ignore:
Timestamp:
Oct 29, 2008 1:36:20 PM (14 years ago)
Author:
srkline
Message:

Added a few more windows to the hide/show lists for the loader

Added a log/lin checkbox for the USANS graph that toggles the x-axis only. The y-axis is always log.

Added a display on the USANS graph that shows Trock/Twide?. It is calculated as UpdateTrans? is clicked. If the value is less than 0.9, the display changes to red.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/COR_Graph.ipf

    r404 r433  
    2929        if(V_flag==0) 
    3030                //draw the blank window and the control bar 
    31                 Display /W=(5,42,450,500) /K=1 
     31                Display /W=(5,42,450,550) /K=1 
    3232                DoWindow/C COR_Graph 
    33                 ControlBar 100 
     33                ControlBar 150 
    3434                SetVariable gTransWide,pos={210,12},size={135,15},title="Trans - Wide",format="%5.4f" 
    3535                SetVariable gTransWide,help={"Average counts on transmssion detector at wide angles"} 
     
    7171                ValDisplay valdispEMP,help={"Displays the peak angle the raw EMP data, determined automatically"} 
    7272         
     73                CheckBox check0 title="Log X-axis",proc=LogLinToggleCheckProc 
     74                CheckBox check0 pos={12,100},value=0,mode=0 
     75                SetVariable setvar0,pos={210,100},size={120,20},title="Trock/Twide",format="%5.4f" 
     76                SetVariable setVar0,help={"fraction of unscattered neutrons"} 
     77                SetVariable setVar0,limits={0,2,0},value= $(USANSFolder+":Globals:MainPanel:gTransRatio") 
     78                 
    7379                Legend 
    7480        Endif 
     
    364370        Variable/G $(USANSFolder+":Globals:MainPanel:gTransRock")=samRock/empRock 
    365371         
     372        TransRatio()            //calculate the ratio and update 
     373         
    366374        return(0) 
    367375End 
     
    403411        RePlotWithUserAngle(type,newPkAngle) 
    404412End 
     413 
     414Function TransRatio() 
     415        NVAR tr = root:Packages:NIST:USANS:Globals:MainPanel:gTransRock 
     416        NVAR tw = root:Packages:NIST:USANS:Globals:MainPanel:gTransWide 
     417        NVAR rat = root:Packages:NIST:USANS:Globals:MainPanel:gTransRatio 
     418         
     419        rat = tr/tw 
     420        if(rat < 0.9) 
     421                SetVariable setVar0 labelBack=(65535,32768,32768) 
     422        else 
     423                SetVariable setVar0 labelBack=0 
     424        endif 
     425        return(0) 
     426End 
     427 
     428Function LogLinToggleCheckProc(cba) : CheckBoxControl 
     429        STRUCT WMCheckboxAction &cba 
     430 
     431        switch( cba.eventCode ) 
     432                case 2: // mouse up 
     433                        Variable checked = cba.checked                   
     434                        if(checked) 
     435                                ModifyGraph log(bottom)=1 
     436                        else 
     437                                ModifyGraph log(bottom)=0 
     438                        endif 
     439                        break 
     440        endswitch 
     441 
     442        return 0 
     443End 
     444 
    405445 
    406446//returns the peak location found (and used) for zero angle 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r432 r433  
    8282        Variable/G gThick = 0.1 
    8383        Variable/G gTypeCheck=1 
     84        Variable/G gTransRatio=1 
    8485        //Text filter for data files AJJ Sept 06 
    8586        String/G FilterStr 
Note: See TracChangeset for help on using the changeset viewer.