T O P I C R E V I E W |
boogerhead |
Posted - 03/31/2006 : 7:30:00 PM Origin Version (Select Help-->About Origin): 7.5SR6 Operating System: XP
Greetings. We're doing some rather complex nls fitting. Right now we're doing it all interactively, using a monster custom function written in Origin C. There are 43 fitting paramters (lots of datasets here). What I'd like to be able to do is automatically "sweep" the intial guesses for some of the paramters - e.g., vary the init guess for parameter 1 from x to y with some reasonable step size, run the fit for each guess, then record the guess with lowest chi2.
Since we're at ~40 seconds/iteration on a P4-3.2, I'd like to automate this as much as possible.
My programming experience with Origin is limited -- but from what I can tell, this *could* be done (easily?) with labtalk, but not Origin C? For silly reasons I would prefer to work with Origin C, but I'll do what I have to...
Thanks,
-Brian |
2 L A T E S T R E P L I E S (Newest First) |
boogerhead |
Posted - 04/01/2006 : 8:37:44 PM Thanks much for the info and quick reply. Looks like it should be straight-forward.
-Brian |
easwar |
Posted - 03/31/2006 : 9:56:07 PM Hi Brian,
The curve fitter can be programmatically accessed and controlled using the LabTalk NLSF object. This object has many methods and properties such as setting fitting function, fit dataset, assinging parameter values, performing iterations etc.
So the nlsf object can be programmatically accessed in a loop where you vary say one parameter from a start to an end value, and inside the loop perform the fit and record the chi-sq.
Please see this post that shows an example of such a loop using script: http://www.originlab.com/forum/topic.asp?TOPIC_ID=4708
Then see this page and the programming example Curve Fitting with Error Bars, under Data analysis, to see how to access the NLSF object from Origin C. Essentially you point to the LabTalk NLSF object and simply use its methods and properties: http://www.originlab.com/index.aspx?s=9&lm=71&pid=268
You can find details on all methods and properties of the NLSF object under the LabTalk Language Reference section of the Programming help file (menu: Help->Programming, then look under LabTalk Lang. Ref and then under Command Reference and Alphabetic Listing and look for NLSF).
Hope this helps.
Easwar OriginLab
Edited by - easwar on 03/31/2006 9:58:44 PM |
|
|