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
 syntax using Integ1 with baseline

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
Nilsdalby Posted - 03/16/2016 : 12:55:39 PM
Origin 2015 SR2 on a win 7 platform

Hi Im running a script to determine FWHM of Peaks from many columns (one peak per col). Im in doubt of the syntax to use for a single column. I wish to use a straight horizontal baseline and the syntax could be something like:

integ1 iy=col(2)[i1:i2] baseline:=1;

Questions:

1) Is it possible to extrapolate the baseline, knowing its horizontal ? That is, i1 is known, i2 is not.
2) I wish to redirect the resulting FWHM, integ.dx or dx, to a cell, is there a special syntax for this?

Thanks, Nils
4   L A T E S T    R E P L I E S    (Newest First)
Nilsdalby Posted - 03/18/2016 : 05:24:30 AM
Ahh, havent seen that function but it is going to be my new favorite X-function, works beautifully, many thanks
SeanMao Posted - 03/18/2016 : 03:34:13 AM
Hi,

Currently this is not supported since the number of intersection points could be more than 2.

We do have another X function levelcrossing can help you easily obtain the X coordinate crossing the given level:

http://www.originlab.com/doc/X-Function/ref/levelcrossing

Give this a try and see how it goes!

Regards!

Sean
Nilsdalby Posted - 03/17/2016 : 05:44:52 AM
Hi Sean

Many thanks for looking into this. Your code work (ofcourse), but i didnt explain the the problem very well, so ive included a graph below. This is a typical trace, and its the FWHM of the peak between i1 and i2 that is of interest, hence this part should be limited by the horizontal baseline. i1 and the Y-value of the baseline are known, i2 varies for all traces and is unknown. Extrapolating baseline to the end gives a wrong FWHM, i need the intersection of graph and baseline. I can find i2 by use of the treplace threshold function but this is not entirely unproblematic as the trace is not monotonic. Is it possible to include the baseline intersection with the graph in the syntax for integ1, without specifically calculating i2 ?
Thanks in advance
SeanMao Posted - 03/16/2016 : 11:38:31 PM
Hi,

Please see the script below:


// end will denote data till the end
integ1 iy:=col(2)[5:end] type:=abs x0:=xcenter dx:=FWHM;

// You can store output as variables
wks.ncols=5;
col(4)[L]$="Peak Center";
col(4)[1]=xcenter;
col(5)[L]$="FWHM";
col(5)[1]=FWHM;



Regards!

Sean

OriginLab Tech.

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