Esempio n. 1
0
 def calculate_blinks(self, x, fs=500):
     """ Calculate the number of blinks that occured in the specified
         time-window.
     """
     blinks = blink_utilities.find_blinks(x['data'][0], fs)
     number_of_blinks = blink_utilities.calculate_blinks(blinks)
     return number_of_blinks
Esempio n. 2
0
 def calculate_blinkrate(self, x, fs=500):
     """ Calculate the blink-rate in the specified time-window
     """
     blinks = blink_utilities.find_blinks(x['data'][0], fs)
     number_of_blinks = blink_utilities.calculate_blinks(blinks)
     return number_of_blinks / (x['time'][0][0] - x['time'][0][-1])