code: def save_to_file(self, data, stamp):
          
          self.datafile.append(self.current_dataset_name, data)
          # save stimulu info
          info = dict(self._stimulus.componentDoc().items() + self._stimulus.testDoc().items())
          print 'saving doc', info
          info['time_stamps'] = [stamp]
          info['samplerate_ad'] = self.player.aifs
          self.datafile.append_trace_info(self.current_dataset_name, info)
docs: Saves data to current dataset.
  
          :param data: data to save to file
          :type data: numpy.ndarray
          :param stamp: time stamp of when the data was acquired
          :type stamp: str