| Author |
Topic  |
|
|
rrahul
USA
Posts |
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; |
|
|
Mike Buess
USA
3037 Posts |
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 |
 |
|
| |
Topic  |
|
|
|