11-07-2014 01:46 AM
Hi,
I am trying to get Max and Average values from the single channel which has different cycles within it. I have tried using the commands like Chnclasspeak3 and chnpeakfind but they were not usefull for me. What I need is the Max and Average values of the different number cycles logged in the data channel.
For exampld if the channel contains 5 numbers of repetitive cycles, then we need to find the Max and Average values of those 5 cycles in the single channel. Attached the data for reference.It is .raw file and I have the plugin for that to be used in diadem 11.1.
Regards,
X. Ignatius
Solved! Go to Solution.
11-08-2014 10:55 AM
Hello Igni,
what would you say is teh rule to detect the cycles? I looked at the data and I would gues your example dataset has about 38 cycles
Would a steep positive or negative slope indicate teh begin/end of a cycle ?
Andreas
11-09-2014 11:24 PM
HI Andreas,
Thanks for the reply.
Yes, the steep positive and Negative slope indicates the begin and end of the cycles respectively. I used the command chnclasslevcross to count the number of cycles but I do not know how to take the max, min and average values of the 38 cycles in there.
Regards,
X. Ignatius
11-10-2014 06:34 AM
Hello Ignatius
The way to go would be to identify the start and end of the segments you are interested in and then use the statistics function to calculate the maximum and average
The attached example shows how to do this. To find the segments, it uses a function introduced with DIAdem 2012. Hopefully that's not a problem.
The example calculates the derivative of the data channel to identify the segments by looking at a derivative value smaller than x, with x being set to 4 for now.
The script lists the values for maximum and minimum for each segment. It also finds the segments which are close to 0. Not sure whether this is what you want but it would be easy to exclude those
Andreas
11-10-2014 07:24 AM
Andreas,
I am unable to find the command " chneventdetectionvaluewindow " in diadem 11.1. I tried searching web but found no result with the command.
Is there any equivalent command in diadem 11. 1 to use it. I have read your program, looks like the one I need. If you could help me in running in version 11.1, it would be of big sigh off for me.
Regards,
X. Ignatius
11-11-2014 06:36 AM
Hello Ignatius,
sorry I totally missed teh fact that your are using 11.1 . The command was released with 2012. I will try to find a workaround using functions which were available wirh 11.1
Andreas
11-11-2014 08:56 AM
Andreas,
Awaiting for your reply.
Regards,
X. Ignatius
11-13-2014 01:21 PM
Hello Ignatius,
sorry, it took a while to provide a script based replacement for the function. Please take a look at the attached script. I changed the script so that it will use my function if the DIAdem-version is less than 12. My script function is by no means as fast and stable as the DIAdem implementation but for now, it does the job
Andreas
11-17-2014 07:57 AM
Thank you very much Andreas, it is working.
Regards,
X. Ignatius