code: def fill_output_table(filelist, hdu, collist, nbins):
      
      nfiles = len(filelist)
      shape = (nbins, nfiles)
      outdict = {}
      for c in collist:
          outdict[c['name']] = np.ndarray(shape)
  
      sys.stdout.write('Working on %i files: ' % nfiles)
      sys.stdout.flush()
      for i, f in enumerate(filelist):
          sys.stdout.write('.')
          sys.stdout.flush()
          tab = Table.read(f, hdu)
          for c in collist:
              cname = c['name']
              outdict[cname][:, i] = tab[cname].data
      sys.stdout.write('!\n')
      outcols = []
      for c in collist:
          cname = c['name']
          if 'unit' in c:
              col = Column(data=outdict[cname], name=cname,
                           dtype=np.float, shape=nfiles, unit=c['unit'])
          else:
              col = Column(data=outdict[cname], name=cname,
                           dtype=np.float, shape=nfiles)
          outcols.append(col)
      tab = Table(data=outcols)
      return tab
docs: Fill the arrays from the files in filelist
  
      Parameters
      ----------
  
      filelist : list
          List of the files to get data from.
  
      hdu : str
          Name of the HDU containing the table with the input data.
  
      colllist : list
          List of the column names
  
      nbins : int
          Number of bins in the input data arrays
  
      Returns
      -------
  
      table : astropy.table.Table
          A table with all the requested data extracted.