📺 Watch how to automatically find the max and min of an Analysis Value - articulateinstruments/AAA-DeepLabCut-Resources GitHub Wiki
Click on the video below to watch it on YouTube.
The above video was recorded in AAA version 219 on 29th July 2020
this is a tutorial video on how to calculate the maximum or annotate rather the maximum and minimum values of an analysis value here we've got some swallowing data and we've measured the hyoid transition the movement of the hyoid through the swallow along the x-axis and then we've run a smoothing calculation to create a smoothed version in orange here of the hyoid transition so what we can do is right click on this display with the smoothed analysis value and select find and in this dialog we want to select hyoid smoothed and that's the analysis value we're going to process and then we'll add an operation we want to set the search area that we're going to search to find the maximum and minimum value and we're going to set that search area to be the whole recording in this instance and then the next thing we want to do is we want to find the maximum and minimum value first we'll find the maximum value by using the find peak valley option and here we're going to find peaks i.e maximums and we're going to find the biggest one in the search area and we're going to save this value and we'll call it max x okay and then again similarly for the minimum we'll select again find peak valley this time we'll set it to valleys or minima again we want the the smallest value in the entire search area and we'll do min x and again we want to save this and now simply all we need to do is run the execute we can save this little script here that we've just created and we can save and give it a name hyoid max min and that's because i put a slash in the file name try that again it doesn't look like here we go so we have to save that now if we go into load we should find hyoid max min as this option here that we've just selected i select execute now this little dialog here just shows the steps that have been followed through and on the right we can see max hyoid x if i just close this window and select max hyoid x you'll see it select this time point here corresponding to the maximum value in this curve and similarly if i select this annotation min hyoid x you can see it select this time point and we can subsequently use the file data export to export these values into a text file and process later