Structure-based implementations of complicated stuff like FuncFit & Optimize

Usual sorries apply if this has already made it on the Wish List...

Setting up calls to some of Igor's more complicated routines often necessitates building a messy string and then calling Execute. Afterwards, up to roughly 1 bagillion globals can get created. It'd be cleaner in certain cases (all cases?) if there were structure-based implementations of these routines.

My opinion is that waves returned in the structs should be /FREE. Then it's up to the user to snatch them up and make them global.

Every step that Igor takes toward using structs, refs and locals (i.e., away from flags, strings, and globals) makes it WAY cleaner & easier to use (from a programmer's standpoint). This just seems like one of the next natural steps. In fact, given some of the progress in making structure-based versions of some of the GUI action functions leads me to believe this sort of thing may already be on the agenda?

Nick
No, I don't think this is on the wish list yet.

The CurveFit and FuncFit operations are quite old, dating back *way* before structures and free waves and data folders. It is my dream to one day create a much cleaner interface than CurveFit and FuncFit, but it would be a massive job.

In the case of CurveFit and FuncFit, I have recently added a new flag, /NWOK, that tells the parser that it's OK to have a null wave reference. That should make it possible to avoid the annoying Execute statement for those operations. For instance, you can do this:

FuncFit myfitfunc, mycoefs, myYData /X=$xwave /NWOK

and if xwave is an empty string it will be just like not having /X at all. This idea has not been applied to other operations, though.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com