Ignore:
Timestamp:
Oct 1, 2007 3:24:37 PM (15 years ago)
Author:
srkline
Message:

Updated the template to include all of the analysis package template items so that the model will function properly.
Updated the model to generate the keyword=string pairs for the function/suffix.
Updated the instructions.

Location:
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/SingleModelTemplate
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/SingleModelTemplate/My_Model.ipf

    r135 r175  
    3636//needed to calculate the model function. 
    3737// 
    38 Macro Plot_MyModel(num,qmin,qmax) 
     38Macro PlotMyModel(num,qmin,qmax) 
    3939        Variable num=200, qmin=0.001, qmax=0.7 
    4040        Prompt num "Enter number of data points for model: " 
     
    5656        Label left "I(q) (cm\\S-1\\M)" 
    5757        AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) 
     58         
     59        AddModelToStrings("MyModel","coef_MyModel","MyModel") 
    5860// 
    5961End 
     
    6769//////////////////////////////////////////////////// 
    6870// - sets up a dependency to a wrapper, not the actual SmearedModelFunction 
    69 Macro PlotSmeared_MyModel(str)                                                           
     71Macro PlotSmearedMyModel(str)                                                            
    7072        String str 
    7173        Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) 
     
    8991                                         
    9092        Variable/G gs_MyModel=0 
    91         gs_MyModel := fMyModel_Smeared(smear_coef_MyModel,smeared_MyModel,smeared_qvals)        //this wrapper fills the STRUCT 
     93        gs_MyModel := fSmearedMyModel(smear_coef_MyModel,smeared_MyModel,smeared_qvals) //this wrapper fills the STRUCT 
    9294         
    9395        Display smeared_MyModel vs smeared_qvals 
     
    98100         
    99101        SetDataFolder root: 
     102        AddModelToStrings("SmearedMyModel","smear_coef_MyModel","MyModel") 
    100103End 
    101104 
     
    173176// 
    174177// this is all there is to the smeared model calculation! 
    175 Function MyModel_Smeared(s) : FitFunc 
     178Function SmearedMyModel(s) : FitFunc 
    176179        Struct ResSmearAAOStruct &s 
    177180 
    178181//      the name of your unsmeared model (AAO) is the first argument 
    179         s.yW = Smear_Model_20(MyModel,s.coefW,s.xW,s.resW) 
     182        Smear_Model_20(MyModel,s.coefW,s.xW,s.yW,s.resW) 
    180183 
    181184        return(0) 
     
    193196// used only for the dependency, not for fitting 
    194197// 
    195 Function fMyModel_Smeared(coefW,yW,xW) 
     198Function fSmearedMyModel(coefW,yW,xW) 
    196199        Wave coefW,yW,xW 
    197200         
     
    208211         
    209212        Variable err 
    210         err = MyModel_Smeared(fs) 
     213        err = SmearedMyModel(fs) 
    211214         
    212215        return (0) 
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/SingleModelTemplate/ReadMe_SingleModelTemplate.txt

    r42 r175  
    44 
    5514 AUG 2006 SRK 
     6 
     7Updated to use the new structure function format 
     8 
     901 OCT 2007 SRK 
Note: See TracChangeset for help on using the changeset viewer.