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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Copying fit parameters with mf2wks

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
rrahul Posted - 06/13/2006 : 10:17:20 AM
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;
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/24/2006 : 08:30:35 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000