- Timestamp:
- Oct 1, 2007 3:24:37 PM (15 years ago)
- 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 36 36 //needed to calculate the model function. 37 37 // 38 Macro Plot _MyModel(num,qmin,qmax)38 Macro PlotMyModel(num,qmin,qmax) 39 39 Variable num=200, qmin=0.001, qmax=0.7 40 40 Prompt num "Enter number of data points for model: " … … 56 56 Label left "I(q) (cm\\S-1\\M)" 57 57 AutoPositionWindow/M=1/R=$(WinName(0,1)) $WinName(0,2) 58 59 AddModelToStrings("MyModel","coef_MyModel","MyModel") 58 60 // 59 61 End … … 67 69 //////////////////////////////////////////////////// 68 70 // - sets up a dependency to a wrapper, not the actual SmearedModelFunction 69 Macro PlotSmeared _MyModel(str)71 Macro PlotSmearedMyModel(str) 70 72 String str 71 73 Prompt str,"Pick the data folder containing the resolution you want",popup,getAList(4) … … 89 91 90 92 Variable/G gs_MyModel=0 91 gs_MyModel := f MyModel_Smeared(smear_coef_MyModel,smeared_MyModel,smeared_qvals) //this wrapper fills the STRUCT93 gs_MyModel := fSmearedMyModel(smear_coef_MyModel,smeared_MyModel,smeared_qvals) //this wrapper fills the STRUCT 92 94 93 95 Display smeared_MyModel vs smeared_qvals … … 98 100 99 101 SetDataFolder root: 102 AddModelToStrings("SmearedMyModel","smear_coef_MyModel","MyModel") 100 103 End 101 104 … … 173 176 // 174 177 // this is all there is to the smeared model calculation! 175 Function MyModel_Smeared(s) : FitFunc178 Function SmearedMyModel(s) : FitFunc 176 179 Struct ResSmearAAOStruct &s 177 180 178 181 // 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) 180 183 181 184 return(0) … … 193 196 // used only for the dependency, not for fitting 194 197 // 195 Function f MyModel_Smeared(coefW,yW,xW)198 Function fSmearedMyModel(coefW,yW,xW) 196 199 Wave coefW,yW,xW 197 200 … … 208 211 209 212 Variable err 210 err = MyModel_Smeared(fs)213 err = SmearedMyModel(fs) 211 214 212 215 return (0) -
sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/SingleModelTemplate/ReadMe_SingleModelTemplate.txt
r42 r175 4 4 5 5 14 AUG 2006 SRK 6 7 Updated to use the new structure function format 8 9 01 OCT 2007 SRK
Note: See TracChangeset
for help on using the changeset viewer.