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
 LabTalk Forum
 Remove background at fixed anchor points : Labtalk

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
Nico_22 Posted - 08/22/2014 : 04:37:58 AM
Origin Ver. 9.0 and Service Release SR1b76
Operating System: Win 8.1

Hi everyone,

My problem is the following:
I have plots with peaks and background that I would like to fit with a routine script. The peaks are always more or less at the same position and I found how to fit them. My main problem is to remove the background that changes from one plot to another.
I would like to fit that background at given anchor points (between the peaks) and then remove it. I tried the blauto function but this one do not allow me to choose the anchor points. I would like to set a vector of let's say 10 values that are the position along the X axis where the background has to be evaluated. Then interpolate that background with spline ideally and finally remove it on my plot to fit the peaks.
Do you have any idea how to do that?

I hope this explanation is clear.

Thank you very much in advance for your help,

Best ,

Nico
3   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 08/27/2014 : 03:02:17 AM
Hi Nicolas,

Yes, the values in the Anchor X column are the values of X (wavelength).

Best regards,
Jason Zhao
OriginLab Tech Service

Nico_22 Posted - 08/26/2014 : 05:09:32 AM
Hi Jason,

thank you very much, this works perfectly!

Just to make sure because I wasn't, the values in the Anchor X column (column5) are the proper values of X (wavelength here) and not the index of the row giving wavelength values in column 1 in that example.

Best regards,

Nicolas
jasonzhao Posted - 08/25/2014 : 04:19:17 AM
Hi Nico,

Please see the following examples which shown the way of:
1. create the spline with anchor points
2. interpolate and connect the spline
3. subtract the baseline(spline) from the original data

for(int i=2;i<5;i++)
{
spline ix:=1!Col(5) iy:=1!(Col(1), Col($(i))) ox:=2!<new>;  
//Col(5) is X for anchor points, create the Y values for anchor points by spline 
interp1 ix:=1!Col(1) iy:=(1!Col(5), 2!Col($(i-1))) ox:=3!<new>; 
//bridge the anchor point to baseine, using original X as baseline X  
range a1=1!Col($(i));
range a2=3!Col($(i-1));   // substract the curve by baseline.
a1=a1-a2;
};




Best regards,
Jason Zhao
OriginLab Tech Service

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