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