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
 Forum for Origin C
 Peak and Baseline with Least Squares
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Ielucero

Argentina
3 Posts

Posted - 08/08/2019 :  2:46:12 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 2018. and Service Release (Select Help-->About Origin):
Operating System: windows 7.
Any knows how to program OriginC to can apply a 'Peaks and Baselines'-->'Peak Analizer'-->'Open Dialog'-->'Create Baseline' --> 'baseline mode (Asymmetric least square smoothing)'.
I really just need to apply least square method to get a baseline of my signal, and the one in the menu work just great!
I am integrating accelerometer (g) to get velocity (m/s).
Thank You very much!

yuki_wu

896 Posts

Posted - 08/08/2019 :  9:53:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Could you please take a look at this page to see if this applies to you?
https://www.originlab.com/doc/OriginC/guide/Peaks-and-Baseline

Regards,
Yuki

OriginLab
Go to Top of Page

Ielucero

Argentina
3 Posts

Posted - 08/09/2019 :  09:05:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
yuki_wu, thanks for your prompt reply!
I checked the link you sent me, but I can't find an option to apply least square to create a base line o just a fit curve.
I'm trying to automate the menu secuence:
'Peaks and Baselines'-->'Peak Analizer'-->'Open Dialog'-->'Create Baseline' --> 'baseline mode (Asymmetric least square smoothing)'

Thank you
Go to Top of Page

yuki_wu

896 Posts

Posted - 08/12/2019 :  02:56:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

There is no OC function for creating a baseline based on ALS method so far.

However, to open Peak Analyzer as you mentioned, I think you could save the options as a theme first and then use pa X-Function to open the dialog.

1. Select Analysis: Peak and Baseline: Peak Analyzer to open dialog
2. Select Create Baseline, click Next button and select ALS as Baseline Mode
3. Click the black triangle button and select Save as “MyTheme”
4. Run LabTalk Script to open PA dialog with the options you specified
pa iy:=(1,2) smode:=0 theme:=MyTheme;

https://www.originlab.com/doc/X-Function/ref/pa
5. To execute LabTalk script in Origin C, you could use Origin C function:
LT_execute

https://www.originlab.com/doc/OriginC/ref/LT_execute

Hope it helps.

Regards,
Yuki
OriginLab
Go to Top of Page

Ielucero

Argentina
3 Posts

Posted - 08/12/2019 :  09:02:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
yuki_wu, thank you very much!! I tried the code and it works wonderfully!!!
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