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
 Any way to find peaks not on graph basis?

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
adamleewiner Posted - 07/30/2008 : 6:11:28 PM
Hello,
How to find peaks from datasets or columes rather than from a graph, I mean the input data is from a workbook without a graph existing.

An USTCer always keep trying.
2   L A T E S T    R E P L I E S    (Newest First)
adamleewiner Posted - 07/31/2008 : 07:59:34 AM
Thanks for you reply, Deanna.
However, I think I have to first plot a graph and then pkfind to get what I want. Origin is becoming more and more powerful.
quote:
Originally posted by Deanna

Hi,

If you are using Orign SR2 (the latest patch), you can use the pkfind X-Function to find peaks from datasets/columns/ranges. Below is an example of importing spectrum data and finding peaks in it.


//Import spectrum data with 7 peaks
string fname$=system.path.program$ + "Samples\Spectroscopy\HiddenPeaks.dat";
newbook sheet:=0;
newsheet cols:=5 labels:="Time|Spectrum Data|Peak Center Indices|Peak Center X|Peak Center Y";
impASC;
string bkn$=%H;

//Find peak centers
pkFind iy:=col(2) method:=second ocenter:=col(3) oleft:=<none> oright:=<none> ;

//Find peak center positions by their indeces
col(4)=col(1)[col(3)];	//X positions
col(5)=col(2)[col(3)];	//Y positions

//Plot spetrum data as a black line
plotxy iy:=col(2) plot:=200;

//Plot peak centers as red scatters
plotxy iy:=[bkn$]1!(4,5) plot:=201  legend:=1 color:=2 ogl:=1!;


Deanna
OriginLab Technical Services



An USTCer always keep trying.
Deanna Posted - 07/30/2008 : 11:53:02 PM
Hi,

If you are using Orign SR2 (the latest patch), you can use the pkfind X-Function to find peaks from datasets/columns/ranges. Below is an example of importing spectrum data and finding peaks in it.


//Import spectrum data with 7 peaks
string fname$=system.path.program$ + "Samples\Spectroscopy\HiddenPeaks.dat";
newbook sheet:=0;
newsheet cols:=5 labels:="Time|Spectrum Data|Peak Center Indices|Peak Center X|Peak Center Y";
impASC;
string bkn$=%H;

//Find peak centers
pkFind iy:=col(2) method:=second ocenter:=col(3) oleft:=<none> oright:=<none> ;

//Find peak center positions by their indeces
col(4)=col(1)[col(3)];	//X positions
col(5)=col(2)[col(3)];	//Y positions

//Plot spetrum data as a black line
plotxy iy:=col(2) plot:=200;

//Plot peak centers as red scatters
plotxy iy:=[bkn$]1!(4,5) plot:=201  legend:=1 color:=2 ogl:=1!;


Deanna
OriginLab Technical Services

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