code: def read_data(self):
          
          window_start = self.parent.value('window_start')
          window_end = window_start + self.parent.value('window_length')
          dataset = self.parent.info.dataset
          groups = self.parent.channels.groups
  
          chan_to_read = []
          for one_grp in groups:
              chan_to_read.extend(one_grp['chan_to_plot'] + one_grp['ref_chan'])
  
          if not chan_to_read:
              return
          data = dataset.read_data(chan=chan_to_read,
                                   begtime=window_start,
                                   endtime=window_end)
  
          max_s_freq = self.parent.value('max_s_freq')
          if data.s_freq > max_s_freq:
              q = int(data.s_freq / max_s_freq)
              lg.debug('Decimate (no low-pass filter) at ' + str(q))
  
              data.data[0] = data.data[0][:, slice(None, None, q)]
              data.axis['time'][0] = data.axis['time'][0][slice(None, None, q)]
              data.s_freq = int(data.s_freq / q)
  
          self.data = _create_data_to_plot(data, self.parent.channels.groups)
docs: Read the data to plot.