Changeset 475


Ignore:
Timestamp:
Feb 13, 2009 3:24:12 PM (13 years ago)
Author:
srkline
Message:

Added a new, simpler procedure to do a global fit of two data sets with a single model. This is for the most common case of USANS+SANS data. This now appears as a new Package "Simple Global Fit". Still in testing mode, many features are intentionally NOT there. This is supposed to be simple. Not all features will be added.

Includes, GlobalFit? changed to accomodate the new procedure, and provide better formatted report.

Main_USANS changed to repair display glitch on main panel in the status listbox

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
1 added
4 edited

Legend:

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

    r394 r475  
    48804880        String topGraph,GF_resultStr 
    48814881         
     4882//      String/G root:inputStr=GF_resultStr 
     4883 
    48824884        String nb = "GF_Report" 
    48834885        String str="" 
     
    48924894         
    48934895        //setup 
    4894         Notebook $nb defaultTab=36, statusWidth=252, pageMargins={44,44,44,44}          //44 points = 0.6" margin all around 
    4895         Notebook $nb showRuler=1, rulerUnits=1, updating={1, 60} 
    4896         Notebook $nb newRuler=Normal, justification=0, margins={0,0,524}, spacing={0,0,0}, tabs={}, rulerDefaults={"Geneva",10,0,(0,0,0)} 
     4896        Notebook $nb defaultTab=18, statusWidth=252, pageMargins={44,44,44,44}          //44 points = 0.6" margin all around 
     4897        Notebook $nb showRuler=1, rulerUnits=1 
     4898        Notebook $nb newRuler=Normal, justification=0, margins={0,0,524}, spacing={0,0,0}, rulerDefaults={"Geneva",10,0,(0,0,0)} 
    48974899//       
    48984900        // insert title 
     
    49114913        SetDataFolder $("root:"+dataFileStr+":") 
    49124914        paramStr = WaveList("*param*_"+suffix, "", "TEXT:1," ) 
    4913         Wave/T pw = $paramStr 
     4915        Wave/T/Z pw = $paramStr 
    49144916        num=numpnts(pw) 
     4917         
     4918//      String/G root:beforeStr=GF_resultStr 
     4919        //SRK clean up text a bit 
     4920        GF_resultStr = ReplaceString("data set ",GF_resultStr, "", 1)           //case-sensitive 
     4921         
     4922        for(ii=0;ii<num;ii+=1) 
     4923                GF_resultStr = ReplaceString("; Coef_"+num2str(ii), GF_resultStr,"") 
     4924        endfor 
     4925        //eSRK 
    49154926        for(ii=0;ii<num;ii+=1) 
    49164927                GF_resultStr = ReplaceString("Coef_"+num2str(ii), GF_resultStr, pw[ii]) 
    49174928        endfor 
     4929         
     4930//      String/G root:afterStr=GF_resultStr 
     4931         
    49184932        SetDataFolder $savDF 
    49194933         
    49204934        Notebook $nb ruler=Normal 
    4921         Notebook $nb  margins={0,0,524}, tabs={63 + 3*8192} 
     4935        Notebook $nb margins={0,0,524} 
    49224936        Notebook $nb text=GF_resultStr 
     4937        Notebook $nb text="\r" 
    49234938         
    49244939        //the graph 
     
    49494964        return(0) 
    49504965end 
    4951  
    4952  
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/SA_includes_v400.ipf

    r473 r475  
    3636                "Sum Two Models",Execute/P "INSERTINCLUDE \"SumSANSModels_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SumModelPanel()" 
    3737                "Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "WM_NewGlobalFit1#InitNewGlobalFitPanel()" 
     38                "Simple Global Fitting",Execute/P "INSERTINCLUDE \"GlobalFit2_NCNR_v40\"";Execute/P "INSERTINCLUDE \"SimpleGlobalFit_NCNR_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Init_SimpleGlobalFit()" 
    3839                "Determine Invariant",Execute/P "INSERTINCLUDE \"Invariant_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "Make_Invariant_Panel()" 
    3940                "Do Linear Fits",Execute/P "INSERTINCLUDE \"LinearizedFits_v40\"";Execute/P "COMPILEPROCEDURES ";Execute/P "A_OpenFitPanel()" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf

    r472 r475  
    902902        SetVariable MC_setvar0,pos={28,73},size={144,15},bodyWidth=80,title="# of neutrons" 
    903903        SetVariable MC_setvar0,format="%5.4g" 
    904         SetVariable MC_setvar0,limits={-inf,inf,100},value= root:Packages:NIST:SAS:gImon 
     904        SetVariable MC_setvar0,limits={0,inf,100},value= root:Packages:NIST:SAS:gImon 
    905905        SetVariable MC_setvar0_1,pos={28,119},size={131,15},bodyWidth=60,title="Thickness (cm)" 
    906         SetVariable MC_setvar0_1,limits={-inf,inf,0.1},value= root:Packages:NIST:SAS:gThick 
     906        SetVariable MC_setvar0_1,limits={0,inf,0.1},value= root:Packages:NIST:SAS:gThick 
    907907        SetVariable MC_setvar0_2,pos={28,96},size={149,15},bodyWidth=60,title="Incoherent XS (cm)" 
    908         SetVariable MC_setvar0_2,limits={-inf,inf,0.1},value= root:Packages:NIST:SAS:gSig_incoh 
     908        SetVariable MC_setvar0_2,limits={0,inf,0.1},value= root:Packages:NIST:SAS:gSig_incoh 
    909909        SetVariable MC_setvar0_3,pos={28,142},size={150,15},bodyWidth=60,title="Sample Radius (cm)" 
    910910        SetVariable MC_setvar0_3,limits={-inf,inf,0.1},value= root:Packages:NIST:SAS:gR2 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r472 r475  
    946946        //skip the next line 
    947947        FReadLine refnum,buffer 
    948         //the next line is the title, use it all 
     948        //the next line is the title, use it all except the last character - causes formatting oddities in listBox 
    949949        FReadLine refnum,buffer 
    950         statusWave[3] = "TITLE: "+ buffer 
     950        statusWave[3] = "TITLE: "+ buffer[0,strlen(buffer)-2] 
    951951         
    952952        //skip the next 3 lines 
     
    12921292        endif 
    12931293End 
    1294  
Note: See TracChangeset for help on using the changeset viewer.