code: def _create_data(data, active_chan, ref_chan=[], grp_name=None):
      
      output = ChanTime()
      output.s_freq = data.s_freq
      output.start_time = data.start_time
      output.axis['time'] = data.axis['time']
      output.axis['chan'] = empty(1, dtype='O')
      output.data = empty(1, dtype='O')
      output.data[0] = empty((len(active_chan), data.number_of('time')[0]),
                             dtype='f')
  
      sel_data = _select_channels(data, active_chan + ref_chan)
      data1 = montage(sel_data, ref_chan=ref_chan)
      data1.data[0] = nan_to_num(data1.data[0])
  
      all_chan_grp_name = []
  
      for i, chan in enumerate(active_chan):
          chan_grp_name = chan
          if grp_name:
              chan_grp_name = chan + ' (' + grp_name + ')'
          all_chan_grp_name.append(chan_grp_name)
  
          dat = data1(chan=chan, trial=0)
          output.data[0][i, :] = dat
  
      output.axis['chan'][0] = asarray(all_chan_grp_name, dtype='U')
  
      return output
docs: Create data after montage.
  
      Parameters
      ----------
      data : instance of ChanTime
          the raw data
      active_chan : list of str
          the channel(s) of interest, without reference or group
      ref_chan : list of str
          reference channel(s), without group
      grp_name : str
          name of channel group, if applicable
  
      Returns
      -------
      instance of ChanTime
          the re-referenced data