(self, sample)
Writes a sample to the log file.
		
		Arguments

		sample		-	A (t, [L, R]) tuple/list. Explanation below:
		t, [L, R]		-	t is a timestamp associated with the sample.
						[L, R] is a NumPy array that contains the
						following:
						L = numpy.array([px, py, ps, gx, gy])
						R = numpy.array([px, py, ps, gx, gy])
						px is an integer indicating the pupil's
						likely horizontal position within the image.
						py is an integer indicating the pupil's
						likely vertical position within the image.
						ps is an integer indicating the pupil's
						size in pixels. The size reflects the width
						of the rect in which the pupil falls when
						mode=='diameter', or the total amount of
						thresholded pixels when mode'surface'.
						gx is an integer indicating the pupil's
						likely horizontal position within the image.
						gy is an integer indicating the pupil's
						likely vertical position within the image.
						All of these values can be None if they
						could not be obtained.
Writes a sample to the log file.
		
		Arguments
Writes a sample to the log file . Arguments
def _log_sample(self, sample):
		
		"""Writes a sample to the log file.
		
		Arguments

		sample		-	A (t, [L, R]) tuple/list. Explanation below:
		t, [L, R]		-	t is a timestamp associated with the sample.
						[L, R] is a NumPy array that contains the
						following:
						L = numpy.array([px, py, ps, gx, gy])
						R = numpy.array([px, py, ps, gx, gy])
						px is an integer indicating the pupil's
						likely horizontal position within the image.
						py is an integer indicating the pupil's
						likely vertical position within the image.
						ps is an integer indicating the pupil's
						size in pixels. The size reflects the width
						of the rect in which the pupil falls when
						mode=='diameter', or the total amount of
						thresholded pixels when mode'surface'.
						gx is an integer indicating the pupil's
						likely horizontal position within the image.
						gy is an integer indicating the pupil's
						likely vertical position within the image.
						All of these values can be None if they
						could not be obtained.
		"""
		
		# Compose a string that can be written to the log file. This
		# contains the timestamp in milliseconds (hence *1000), the left
		# eye's values, and the right eye's values, all separated by tabs.
		l = [int(sample[0]*1000)]
		l.extend(list(sample[1][0]))
		l.extend(list(sample[1][1]))
		line = u'\t'.join(map(unicode, l)) + u'\n'

		# Write to the log file. Acquire the log lock first, and release it
		# after writing, to prevent simultaneous writing to the same log.
		self._loglock.acquire(True)
		self._logfile.write(line)
		self._loglock.release()
def _log_sample ( self , sample ) : # Compose a string that can be written to the log file. This # contains the timestamp in milliseconds (hence *1000), the left # eye's values, and the right eye's values, all separated by tabs. l = [ int ( sample [ 0 ] * 1000 ) ] l . extend ( list ( sample [ 1 ] [ 0 ] ) ) l . extend ( list ( sample [ 1 ] [ 1 ] ) ) line = u'\t' . join ( map ( unicode , l ) ) + u'\n' # Write to the log file. Acquire the log lock first, and release it # after writing, to prevent simultaneous writing to the same log. self . _loglock . acquire ( True ) self . _logfile . write ( line ) self . _loglock . release ( )