The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Copying fit parameters with mf2wks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rrahul

USA
Posts

Posted - 06/13/2006 :  10:17:20 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin 7 SR4 v 7.0552
Operating System: XP pro

Hi,
I have used the script before and it used to work fine (see below). It fits the data to exponentials and copies the parameters to a wks. However, it doesn't seem to be working any more. The problem seems to be with the 'mf2wks' function. Could you tell me if some changes were made to the Addon.
Thanks in advance.

Rahul Roy


// Execute script: run.section(FitXcorr,Main);
// Operations:
// 1. Import each file into a new worksheet
// 2. Take the first 50 data pts
// 3. Plot the scatter for the data
// 4. Fit the data to a single exponential decay function
// 5. Copy the fit parameters to a wks
//
////////////////////////////////////////////////////////////////////////////////
[Main]
FDLOG.multiopen.colview=12;
FDLOG.UseGroup(Ascii); //Open ASCII files
if (FDLOG.multiopen()==0/0)
return 1;

%O=FitParam; // name of parameter wks (MultiFit will create the wks)
loop(ii,1,FDlog.MultiOpen.Count)
{
FDlog.Get(A, ii);
win -t data;
open -w %A;

%W= %H;

win -ch 1;
// wks.colsel(2,1);
run.section(, Plot, %W);
run.section(Fit,EXPDECAY1);
mf2wks %O; // copy parameters to wks
}


[Plot]


win -t plot Scatter G%W;
layer -i %W_b 0201 201;
layer -a;
layer.x.from = 0;
label -xb "Time(s)";
label -s -p 75 50 -n label1 G%W;
label1.fsize = 22; // change font size for label1

return 0;

Mike Buess

USA
3037 Posts

Posted - 06/24/2006 :  08:30:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

There has been no change in the mf2wks function in well over a year and I still use it to save fit parameters to a specific worksheet just as you have done. The only reason I can imagine that your script should fail is if the worksheet FitParam already exists but has the wrong number of columns. Number of columns should be 3 + 2*(number of parameters).

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000