Ignore:
Timestamp:
Dec 11, 2007 4:19:31 PM (15 years ago)
Author:
srkline
Message:

analysis packages now use canSAS-approved data folders for internal storage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/SumModel/SumSANSModels.ipf

    r200 r228  
    3030// (smeared fitting still broken) 
    3131// - created data folders are now buried in myGlobals 
     32// DEC 07 
     33// - created data folders are now :Packages:NIST:SumModel 
    3234// 
    3335/////////////////////////////// 
     
    3840        DoWindow/F Sum_Model_Panel 
    3941        if(V_flag==0) 
    40                 if(!DataFolderExists("root:myGlobals")) 
    41                         NewDataFolder root:myGlobals 
     42                if(!DataFolderExists("root:Packages:NIST")) 
     43                        NewDataFolder root:Packages:NIST 
    4244                endif 
    43                 NewDataFolder/O root:myGlobals:SumModel 
     45                NewDataFolder/O root:Packages:NIST:SumModel 
    4446                InitSMPGlobals() 
    4547                Sum_Model_Panel() 
     
    5052// 
    5153Function InitSMPGlobals() 
    52         Variable/G root:myGlobals:SumModel:gNParMod1=0 
    53         Variable/G root:myGlobals:SumModel:gNParMod2=0 
     54        Variable/G root:Packages:NIST:SumModel:gNParMod1=0 
     55        Variable/G root:Packages:NIST:SumModel:gNParMod2=0 
    5456end 
    5557 
     
    7173        GroupBox group1,pos={5,50},size={216,107},title="Function # 1" 
    7274        SetVariable setvar1,pos={14,128},size={140,15},title="# of Parameters" 
    73         SetVariable setvar1,limits={0,20,1},value= root:myGlobals:SumModel:gNParMod1 
     75        SetVariable setvar1,limits={0,20,1},value= root:Packages:NIST:SumModel:gNParMod1 
    7476        GroupBox group2,pos={5,171},size={216,107},title="Function # 2" 
    7577        SetVariable setvar2,pos={14,249},size={140,15},title="# of Parameters" 
    76         SetVariable setvar2,limits={0,20,1},value= root:myGlobals:SumModel:gNParMod2 
     78        SetVariable setvar2,limits={0,20,1},value= root:Packages:NIST:SumModel:gNParMod2 
    7779        Button button0,pos={36,299},size={150,20},proc=PlotSumButtonProc,title="Plot Summed Model" 
    7880        Button button1,pos={15,330},size={190,20},proc=PlotSmearedSumButtonProc,title="Plot Smeared Summed Model" 
     
    157159        //make the coefficients and parameters based on the panel values         
    158160        Variable nParam,n1,n2 
    159         n1 = root:myGlobals:SumModel:gNParMod1 
    160         n2 = root:myGlobals:SumModel:gNParMod2 
     161        n1 = root:Packages:NIST:SumModel:gNParMod1 
     162        n2 = root:Packages:NIST:SumModel:gNParMod2 
    161163        nParam = n1 + n2 
    162164        if(n1==0 || n2==0 || nparam==0) 
     
    164166        endif 
    165167        // n is ok, keep extra copy so changing panel will not affect functions 
    166         Variable/G root:myGlobals:SumModel:gN1=n1 
    167         Variable/G root:myGlobals:SumModel:gN2=n2 
     168        Variable/G root:Packages:NIST:SumModel:gN1=n1 
     169        Variable/G root:Packages:NIST:SumModel:gN2=n2 
    168170         
    169171        // these are the function names - make global so the fit function 
    170172        // can find them 
    171173        ControlInfo/W=Sum_Model_Panel popup1_0 
    172         String/G root:myGlobals:SumModel:gModelStr1=S_Value 
     174        String/G root:Packages:NIST:SumModel:gModelStr1=S_Value 
    173175        ControlInfo/W=Sum_Model_Panel popup2_0 
    174         String/G root:myGlobals:SumModel:gModelStr2=S_Value 
     176        String/G root:Packages:NIST:SumModel:gModelStr2=S_Value 
    175177         
    176178        //these are the coefficent waves - local only 
     
    225227        //make the coefficients and parameters based on the panel values         
    226228        Variable nParam,n1,n2 
    227         n1 = root:myGlobals:SumModel:gNParMod1 
    228         n2 = root:myGlobals:SumModel:gNParMod2 
     229        n1 = root:Packages:NIST:SumModel:gNParMod1 
     230        n2 = root:Packages:NIST:SumModel:gNParMod2 
    229231        nParam = n1 + n2 
    230232        if(n1==0 || n2==0 || nparam==0) 
     
    232234        endif 
    233235        // n is ok, keep extra copy so changing panel will not affect functions 
    234         Variable/G root:myGlobals:SumModel:gN1=n1 
    235         Variable/G root:myGlobals:SumModel:gN2=n2 
     236        Variable/G root:Packages:NIST:SumModel:gN1=n1 
     237        Variable/G root:Packages:NIST:SumModel:gN2=n2 
    236238         
    237239        // these are the function names - make global so the fit function 
    238240        // can find them 
    239241        ControlInfo/W=Sum_Model_Panel popup1_0 
    240         String/G root:myGlobals:SumModel:gModelStr1=S_Value 
     242        String/G root:Packages:NIST:SumModel:gModelStr1=S_Value 
    241243        ControlInfo/W=Sum_Model_Panel popup2_0 
    242         String/G root:myGlobals:SumModel:gModelStr2=S_Value 
     244        String/G root:Packages:NIST:SumModel:gModelStr2=S_Value 
    243245         
    244246        //these are the coefficent waves - local only, in the current data folder! 
     
    289291        Wave w,yw,xw 
    290292         
    291         SVAR funcStr1=root:myGlobals:SumModel:gModelStr1                //string names of the functions, set by the macro 
    292         SVAR funcStr2=root:myGlobals:SumModel:gModelStr2 
    293         NVAR n1=root:myGlobals:SumModel:gN1                     //number of coefficients, set by the macro 
    294         NVAR n2=root:myGlobals:SumModel:gN2 
     293        SVAR funcStr1=root:Packages:NIST:SumModel:gModelStr1            //string names of the functions, set by the macro 
     294        SVAR funcStr2=root:Packages:NIST:SumModel:gModelStr2 
     295        NVAR n1=root:Packages:NIST:SumModel:gN1                 //number of coefficients, set by the macro 
     296        NVAR n2=root:Packages:NIST:SumModel:gN2 
    295297         
    296298        Variable retVal 
     
    358360end 
    359361 
    360 Menu "Macros" 
     362Menu "SANS Models" 
    361363        Submenu "Packages" 
    362364                "Unload Sum SANS Models", UnloadSumModel() 
Note: See TracChangeset for help on using the changeset viewer.