I'm trying to use FunctionList("*", ";","KIND:11,NINDVARS:1,VALTYPE:2") to populate at PopupMenu with user and Igor defined fit functions. However I get several additional non-fit functions listed as well. I noticed that through the curve fitting dialog if one checks "Show Old-style functions" I see these same additional non-fit functions listed there too. I don't really see that much structural similarities between the non-fit functions listed. Question: How are the Old-style functions defined and recognized (since they don't use":FitFunc" ) by Igor?
Old-style fit functions have the format of a fit function, but lack the FitFunc type keyword. Any function that takes a wave as the first parameter and a variable as the second is an "old style" fit function. Your problem is precisely why I added the FitFunc keyword to Igor.
Just in case some else runs into this issue. He is a quick workaround that prints a list of 1D user and Igor defined fit functions (without the old style stuff)
function test()
//Gets a list of all 1D fit functions
string Flist =FunctionList("*", ";","KIND:11,NINDVARS:1,VALTYPE:2")
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 11, 2015 at 11:07 am - Permalink
June 11, 2015 at 02:36 pm - Permalink
function test()
//Gets a list of all 1D fit functions
string Flist =FunctionList("*", ";","KIND:11,NINDVARS:1,VALTYPE:2")
string strtemp
variable index=0
string StrInfo
do
strtemp=StringFromList(index, Flist)
if(strlen(strtemp)==0)
break
endif
StrInfo= StringByKey("SUBTYPE", functioninfo(strtemp))
//Remove "Old-Style" Functions
if(strlen(StrInfo) !=0 && cmpstr(StrInfo,"Fitfunc")!=0)
Flist=RemoveFromList(strtemp, Flist ,";")
index=index-1
endif
index=index+1
while(1)
print Flist
end
June 12, 2015 at 08:16 am - Permalink