Changeset 476


Ignore:
Timestamp:
Feb 17, 2009 4:37:09 PM (14 years ago)
Author:
srkline
Message:

Tried to stop the unloading clash of GlobalFit? and SimpleGlobalFit?. The Simple fit depends on GlobalFit?, so it can't be unloaded.

SumSANSModels now automatically finds the number of coefficients, since the coefficients are always in the root: folder. Saves the users a step.

Added more windows to the analysis list in the package loader

Location:
sans/Dev/trunk
Files:
5 edited

Legend:

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

    r475 r476  
    14891489                DoWindow/K NewGF_GlobalFitMaskingPanel 
    14901490        endif 
    1491 //      Execute/P "DELETEINCLUDE  <Global Fit 2>" 
    1492         SVAR fileVerExt=root:Packages:NIST:SANS_ANA_EXTENSION 
    1493         String fname="GlobalFit2_NCNR" 
    1494         Execute/P "DELETEINCLUDE \""+fname+fileVerExt+"\"" 
    1495         Execute/P "COMPILEPROCEDURES " 
    1496         KillDataFolder/Z root:Packages:NewGlobalFit 
     1491         
     1492        //SRK - if SimpleGlobalFit is open, go ahead and kill the windows, just 
     1493        // don't un-include the procedure files ! 
     1494        if(Exists("root:Packages:NewGlobalFit:listW") == 0)             //simple fit waves don't exist 
     1495         
     1496        //      Execute/P "DELETEINCLUDE  <Global Fit 2>" 
     1497                SVAR fileVerExt=root:Packages:NIST:SANS_ANA_EXTENSION 
     1498                String fname="GlobalFit2_NCNR" 
     1499                Execute/P "DELETEINCLUDE \""+fname+fileVerExt+"\"" 
     1500                Execute/P "COMPILEPROCEDURES " 
     1501                KillDataFolder/Z root:Packages:NewGlobalFit 
     1502         
     1503        endif 
    14971504end 
    14981505 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/GlobalFit/SimpleGlobalFit_NCNR_v40.ipf

    r475 r476  
    471471End 
    472472 
    473 static Function UnloadSimpleGlobalFit() 
    474         if (WinType("NewGlobalFitPanel") == 7) 
     473// clean up after itself, don't kill any data folder 
     474Function UnloadSimpleGlobalFit() 
     475        if (WinType("SimpGFPanel") == 7) 
    475476                DoWindow/K SimpGFPanel 
    476477        endif 
     
    483484        Execute/P "DELETEINCLUDE \""+fname+fileVerExt+"\"" 
    484485        Execute/P "COMPILEPROCEDURES " 
    485         KillDataFolder/Z root:Packages:NewGlobalFit 
     486        KillWaves/Z root:Packages:NewGlobalFit:listW 
     487        KillWaves/Z root:Packages:NewGlobalFit:selW 
     488        KillWaves/Z root:Packages:NewGlobalFit:titles 
     489         
     490//      KillDataFolder/Z root:Packages:NewGlobalFit 
     491         
     492         
    486493end 
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/SumModel/SumSANSModels_v40.ipf

    r379 r476  
    6969        PopupMenu popup2_0,mode=1,popvalue="Pick model 2",value= #"SumModelPopupList()" 
    7070        PopupMenu popup1_1,pos={15,98},size={173,20},title="Coef" 
    71         PopupMenu popup1_1,mode=1,popvalue="Pick coef for model 1",value= #"CoefPopupList()" 
     71        PopupMenu popup1_1,mode=1,popvalue="Pick coef for model 1",value= #"CoefPopupList()",proc=Func_1_2PopMenuProc 
    7272        PopupMenu popup2_1,pos={15,221},size={173,20},title="Coef" 
    73         PopupMenu popup2_1,mode=1,popvalue="Pick coef for model 2",value= #"CoefPopupList()" 
     73        PopupMenu popup2_1,mode=1,popvalue="Pick coef for model 2",value= #"CoefPopupList()",proc=Func_1_2PopMenuProc 
    7474        GroupBox group1,pos={5,50},size={216,107},title="Function # 1" 
    7575        SetVariable setvar1,pos={14,128},size={140,15},title="# of Parameters" 
     
    8282        Button button2,pos={190,23},size={25,20},proc=Sum_HelpButtonProc,title="?" 
    8383EndMacro 
     84 
     85Function Func_1_2PopMenuProc(pa) : PopupMenuControl 
     86        STRUCT WMPopupAction &pa 
     87 
     88        switch( pa.eventCode ) 
     89                case 2: // mouse up 
     90                        Variable popNum = pa.popNum 
     91                        String popStr = pa.popStr 
     92                        String name=pa.ctrlName 
     93                        Variable num=0 
     94                         
     95                        Wave/Z coef=$("root:"+popStr) 
     96                        if(WaveExists(coef)) 
     97                                num=numpnts(coef) 
     98                        endif 
     99                         
     100                         
     101                        if(cmpstr(name,"popup1_1")==0)          //function #1 
     102                                NVAR pts1 = root:Packages:NIST:SumModel:gNParMod1 
     103                                pts1 = num 
     104                        else 
     105                                NVAR pts2 = root:Packages:NIST:SumModel:gNParMod2 
     106                                pts2 = num 
     107                        endif 
     108                         
     109                        break 
     110        endswitch 
     111 
     112        return 0 
     113End 
    84114 
    85115// show the available models 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf

    r455 r476  
    11#pragma rtGlobals=1             // Use modern global access method. 
     2#pragma IgorVersion=6.0 
     3//#pragma IndependentModule=NCNRLoader          //can't seem to get this to work properly... 
    24 
    35// load/unload courtesy of Jan Ilavsky 
     
    3941        SVAR gMenuStr1b = root:Packages:NCNRItemStr1b 
    4042         
    41         String SANSAna_WinList = "wrapperPanel;Procedure_List;Report;" 
     43        String SANSAna_WinList = "wrapperPanel;Procedure_List;Report;Plot_Manager;A_FitPanel;A_FitWindow;Sum_Model_Panel;" 
     44        SANSAna_WinList += "NewGlobalFitPanel;SimpGFPanel;Invariant_Panel;invariant_graph;" 
    4245        strswitch(itemStr)      // string switch 
    4346                case "Load NCNR Analysis Macros":        
Note: See TracChangeset for help on using the changeset viewer.