def __call__(self, sample):
# keep tract of absolute value of
self.diff = np.add(self.diff,
np.absolute(np.asarray(sample.channel_data)))
self.sample_count = self.sample_count + 1
elapsed_time = timeit.default_timer() - self.last_report
if elapsed_time > self.polling_interval:
channel_noise_power = np.divide(self.diff, self.sample_count)
print (channel_noise_power)
self.diff = np.zeros(self.eeg_channels)
self.last_report = timeit.default_timer()
# # Instanciate "monitor" thread
评论列表
文章目录