I want to count the number of peaks a particular channel has above a certain limit defined by me. For example, If i define 35 as the limit, then it should give me the sum of all the occurences everytime a peak occurs with a value greater than 35.
You should be able to go to Analysis, Channel Functions, Calculate Peaks
Set your x channel, your y channel and lower limit value.
It will return two channels of data. Position and Amplitude. The Length of the channel is how many peaks you have.
I used 40 as my min in the example below.
peak = Data.Root.ChannelGroups(4).Channels("Position1").Properties("length").Value
call MsgBoxDisp (peak, "MB_OK")
Thanks for the reply. I have already tried this and I understand the length of the channel is the number of peaks in the channel, but how do i put that value in a table in a report? Please help!
Thanks & Regards
It depends on how you want your table to look
If you just want to add text that staes the number of peaks
Then in your report set up a text feild and where you want the value to show up type
and it will grab the number from your script and place it in the report.
Sorry I can't help more. I don't use too many tables in my reports.
place 2D table to the REPORT. Then move (drag&drop) channels into tabel a set parameter of the table:
Table Definition -> Scaling -> Table length: Automatic maximum.
There is a simpler way to show the number fo peaks in your report:
You can do this with any property from the dataportal.
If you double click teh text in the layout, a dialog will open which shows you how DIAdem created the reference to the property