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
 Savitzki-Golay Smoothing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tinkusch

Germany
94 Posts

Posted - 08/02/2004 :  06:06:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
there is a peculiar problem with the labtalk comand
curve.SGSmooth()
in Origin Pro 7.0 (B522 SR4, with German WIN98)

my script looks like this:
curve.data$=SOURCE_C;
curve.x$=SOURCE_X;
curve.result$=RESULTS_B;
curve.polydeg=3;
curve.smoothleftpts = 25;
curve.smoothrightpts = 25;
curve.SGSmooth();

I now expected the execution of smoothing over 51 points of Source_c, but instead, Origin sets curve.smoothleftpts and curve.smoothrightpts back to the default value of 2 prior to execution of the smoothing, and then performs the smoothing over 5 points only!

The only way to execute smoothing with preselected value for the smoothranges seems to be the selection via the Origin-Analysis-Smoothing menue. Once these values are set "by hand" they remain unchanged after repeated smoothing. But, of course that is no solution, because I would like to do the selection automatically via the labtalk script.

Any explanation or hint?

Thanks

Stefan


Mike Buess

USA
3037 Posts

Posted - 08/02/2004 :  10:55:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stephan,

Alter your script like this...

curve.data$=SOURCE_C;
curve.x$=SOURCE_X;
curve.result$=RESULTS_B;
curve.polydeg=3;
curve.smoothleftpts = 25;
curve.smoothrightpts = 25;
curve.smoothpts = 51; // total smoothing pts
curve.SGSmooth();

The default value of curve.smoothpts is 5 so leftpts and rightpts are reset if you forget to change it.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/02/2004 11:09:17 AM
Go to Top of Page

tinkusch

Germany
94 Posts

Posted - 08/02/2004 :  11:28:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike, thanks!

anyway, it seems a bit strange to me that one has to set the left and right hand no of points as well as the total no of points.....

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