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
 Origin Forum
 Curve 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

ungat

Belgium
Posts

Posted - 05/23/2006 :  07:34:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:Win XP MCE 2005

Hello everybody,

I would like smoothing curve using S-G method; I tried this:

//Open a new worksheet
win -t data Origin;
//Import sample file
open -w %YSamples\Data\Data with noise.dat;
//Create a column for results
wks.addcol(Result);
//Assign datasets
curve.data$ = DataWithNoise_Signal;
curve.result$ = DataWithNoise_Result;
curve.polyDeg=3;
curve.smoothLeftPts=3;
curve.smoothRightPts=3;
curve.SGSmooth();

But it doesn't work;

could someone help me please?

Thank you very much,

B.R.

Mike Buess

USA
3037 Posts

Posted - 05/23/2006 :  09:08:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You must also use curve.smoothPts=7 or that property will default to 5 and curve.smoothLeft(Right)Pts will revert to 2.

Mike Buess
Origin WebRing Member
Go to Top of Page

ungat

Belgium
Posts

Posted - 05/23/2006 :  09:21:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

You must also use curve.smoothPts=7 or that property will default to 5 and curve.smoothLeft(Right)Pts will revert to 2.

Mike Buess
Origin WebRing Member



Thank you, but why curve.smoothPts=7 (why 7 ?) and why curve.smoothLeft(Right)Pts=2 ? I would like curve.smoothLeft(Right)Pts=3 or 5, is it possible ?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/23/2006 :  10:34:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
curve.smoothLeftPts=3;
curve.smoothRightPts=3;
curve.smoothPts=7; // 3 on left + 3 on right + center pt

The curve object does not do the math on its own so you must set all three properties.

Mike Buess
Origin WebRing Member
Go to Top of Page

ungat

Belgium
Posts

Posted - 05/23/2006 :  11:28:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

curve.smoothLeftPts=3;
curve.smoothRightPts=3;
curve.smoothPts=7; // 3 on left + 3 on right + center pt

The curve object does not do the math on its own so you must set all three properties.

Mike Buess
Origin WebRing Member



Ok thank you, and for Polynomial Order? I want 3, is curve.polyDeg=3 good ?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/23/2006 :  12:39:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Ok thank you, and for Polynomial Order? I want 3, is curve.polyDeg=3 good ?
Yes... according the programming guide its values can range from 1 to 9.

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