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
 Forum for Origin C
 Peak and Baseline with Least Squares

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
Ielucero Posted - 08/08/2019 : 2:46:12 PM
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!
4   L A T E S T    R E P L I E S    (Newest First)
Ielucero Posted - 08/12/2019 : 09:02:05 AM
yuki_wu, thank you very much!! I tried the code and it works wonderfully!!!
yuki_wu Posted - 08/12/2019 : 02:56:31 AM
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
Ielucero Posted - 08/09/2019 : 09:05:15 AM
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
yuki_wu Posted - 08/08/2019 : 9:53:14 PM
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

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