DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the Max and Average values from the different cycles in the single channel

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(6,550 Views)

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

0 Kudos
Message 2 of 9
(6,527 Views)

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

0 Kudos
Message 3 of 9
(6,507 Views)

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

 

0 Kudos
Message 4 of 9
(6,491 Views)

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

0 Kudos
Message 5 of 9
(6,485 Views)

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

0 Kudos
Message 6 of 9
(6,464 Views)

Andreas,

 

Awaiting for your reply.

 

Regards,

X. Ignatius

0 Kudos
Message 7 of 9
(6,457 Views)
Solution
Accepted by topic author Igni

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

 

0 Kudos
Message 8 of 9
(6,420 Views)

Thank you very much Andreas, it is working.

 

 

Regards,

X. Ignatius

0 Kudos
Message 9 of 9
(6,367 Views)