def vstack_tables(filelist, hdus):
    """vstack a set of HDUs from a set of files

    Parameters
    ----------

    filelist : list
        List of the files to get data from.

    hdus : list
        Names of the HDU containing the table with the input data.

    Returns
    -------

    out_tables : list
        A list with the table with all the requested data extracted.

    out_names : list
        A list with the names of the tables.

    """
    nfiles = len(filelist)
    out_tables = []
    out_names = []
    for hdu in hdus:
        sys.stdout.write('Working on %i files for %s: ' % (nfiles, hdu))
        sys.stdout.flush()
        tlist = []
        for f in filelist:
            try:
                tab = Table.read(f, hdu)
                tlist.append(tab)
                sys.stdout.write('.')
            except KeyError:
                sys.stdout.write('x')
            sys.stdout.flush()
        sys.stdout.write('!\n')
        if tlist:
            out_table = vstack(tlist)
            out_tables.append(out_table)
            out_names.append(hdu)
    return (out_tables, out_names)
def vstack_tables ( filelist , hdus ) : nfiles = len ( filelist ) out_tables = [ ] out_names = [ ] for hdu in hdus : sys . stdout . write ( 'Working on %i files for %s: ' % ( nfiles , hdu ) ) sys . stdout . flush ( ) tlist = [ ] for f in filelist : try : tab = Table . read ( f , hdu ) tlist . append ( tab ) sys . stdout . write ( '.' ) except KeyError : sys . stdout . write ( 'x' ) sys . stdout . flush ( ) sys . stdout . write ( '!\n' ) if tlist : out_table = vstack ( tlist ) out_tables . append ( out_table ) out_names . append ( hdu ) return ( out_tables , out_names )
vstack a set of HDUs from a set of files

    Parameters
    ----------

    filelist : list
        List of the files to get data from.

    hdus : list
        Names of the HDU containing the table with the input data.

    Returns
    -------

    out_tables : list
        A list with the table with all the requested data extracted.

    out_names : list
        A list with the names of the tables.