| Author |
Topic  |
|
|
jonni
United Kingdom
58 Posts |
Posted - 06/11/2003 : 4:22:18 PM
|
Hi,
Can anyone help me with the following problem.
I have a worksheet of XYYYYY... format where each Y data set is a series of positive peaks with a zero baseline. My aim is to create a new worksheet with the same X column as the original worksheet but only the peak height values remaining in the Y columns. This I have achieved using the following script:
%k=b c d e f g h i j k l m n o p q r s; //string of column names for (ii=1;ii<=18;ii+=1) { mark -m data3_b; // erase a temporary list (data3_b) of row numbers curve.data$=data1_%[%k,#ii]; // data set to pick peaks from curve.peakindex$=data3_b; // a temporary set of row numbers curve.pickpeaks.rectwidth=0.01; // width of search rectangle curve.pickpeaks.rectheight=0.01; // height of search rectangle curve.pickpeaks.minheight=0.01; // minimum height of smallest peak curve.pickpeaks.simple=1; // baseline already zero curve.pickpeaks(); // pick peaks get data3_b -e jj; // get total number of rows
for (kk=1;kk<=jj;kk+=1) { bbb=%(data3,2,kk); // variable to store row number of peak data2_%[%k,#ii][bbb]=data1_%[%k,#ii][bbb]; // data2 is new worksheet };
};
In the above I have already created data3 (temporary) and data2 (output) with X column. Data2 now has the XYYYY.. structure of data1 but only the peak values of Y.
Now, apart from the peak heights and positions in X which I get from the above script, I would like to know the peak width (FWHM) and (less importantly) the area under each peak. I attempted to use:
curve.halfwidths$=data3_c
after curve.peakindex$=data3_b in the above script, but this returned no values. Am I using this object property wrongly, or am I just missing some additional script? Is there no similar object property for the areas, as I cannot find it in the manual?
Any help (including how I might improve/simplify the above script) would be appreciated.
Thanks.
jonni
|
|
|
Laurie
USA
404 Posts |
Posted - 06/16/2003 : 4:38:07 PM
|
just one quick thought... you might want to look at the LabTalk peaks( ) function.
OriginLab Technical Support |
 |
|
|
jonni
United Kingdom
58 Posts |
Posted - 06/16/2003 : 6:26:53 PM
|
Hi Laurie,
Thank you for your reply and interest.
The peaks() function seems to do exactly the same as the curve.pickpeaks() function: tabulating the peak row numbers. Is this the case or is the peaks() function somehow different (apart from the parameters it uses to determine the peaks)?
Thanks again.
jonni |
 |
|
|
giorgiolev
Argentina
Posts |
Posted - 04/02/2004 : 07:51:59 AM
|
I can not assign the results of the function peaks(data1_b,0.01,0.1); to a dataset. Which will be the sequence?
Thanks,
Giorgio Levy |
 |
|
|
Mike Buess
USA
3037 Posts |
Posted - 04/02/2004 : 08:03:12 AM
|
Hi Giorgio,
dataset=peaks(data1_b,0.01,0.1);
Example...
1. Create column C in the wks data1. 2. data1_c=peaks(data1_b,0.01,0.1);
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 04/02/2004 08:04:29 AM |
 |
|
| |
Topic  |
|