'Writes current data to a csv file'

def write_csv(self):

    fn = ('Webcam-pulse' + str(datetime.datetime.now()))
    fn = fn.replace(':', '_').replace('.', '_')
    data = np.vstack((self.processor.times, self.processor.samples)).T
    np.savetxt((fn + '.csv'), data, delimiter=',')
    print 'Writing    csv'
