Ignore:
Timestamp:
Oct 9, 2012 1:46:21 PM (10 years ago)
Author:
srkline
Message:

added coloring for relative errors for a fit that is greater than 50% of the parameter value. If the error is >50%, the column of W_sigma is made red/bold. It returns to black when the model or data set is switched.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/Wrapper_v40.ipf

    r856 r869  
    33#pragma IgorVersion=6.1 
    44 
     5 
     6// this is the flag for the relative error = W_sigma/coef that will 
     7// trip the bold/red color of W_sigma in the table. 
     8// 
     9Constant kRelErrorTolerance=0.5 
    510 
    611//Macro OpenWrapperPanel() 
     
    10231028        print w_sigma 
    10241029        String resultStr="" 
     1030        Variable maxRelError=0 
    10251031         
    10261032        if(waveexists(W_sigma)) 
     
    10341040                        // -- not really, since any switch of the function menu takes W_Sigma off 
    10351041                endif 
     1042                // then do I want to color it if the errors are horrible? 
     1043                Duplicate/O cw, relError 
     1044                relError = W_sigma/cw 
     1045                maxRelError = WaveMax(relError) 
     1046                if(maxRelError > kRelErrorTolerance) 
     1047                        ModifyTable/W=wrapperPanel#T0 style(W_sigma)=1,rgb(W_sigma)=(65535,0,0) 
     1048                else 
     1049                        ModifyTable/W=wrapperPanel#T0 style=0,rgb=(0,0,0) 
     1050                endif 
     1051                 
    10361052        endif 
    10371053         
Note: See TracChangeset for help on using the changeset viewer.