@read_with_selection<EOL>def read_table(source, tablename=None, **kwargs):
from ligo.lw import table as ligolw_table<EOL>from ligo.lw.lsctables import TableByName<EOL>read_kw = kwargs  <EOL>convert_kw = {<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': False,<EOL>}<EOL>for key in filter(kwargs.__contains__, convert_kw):<EOL><INDENT>convert_kw[key] = kwargs.pop(key)<EOL><DEDENT>if convert_kw['<STR_LIT>'] is None:<EOL><INDENT>convert_kw['<STR_LIT>'] = {}<EOL><DEDENT>try:<EOL><INDENT>columns = list(kwargs.pop('<STR_LIT>'))<EOL><DEDENT>except KeyError:<EOL><INDENT>columns = None<EOL><DEDENT>try:<EOL><INDENT>read_kw['<STR_LIT>'] = list(kwargs.pop('<STR_LIT>'))<EOL><DEDENT>except KeyError:<EOL><INDENT>read_kw['<STR_LIT>'] = columns<EOL><DEDENT>convert_kw['<STR_LIT>'] = columns or read_kw['<STR_LIT>']<EOL>if tablename:<EOL><INDENT>tableclass = TableByName[ligolw_table.Table.TableName(tablename)]<EOL>if convert_kw['<STR_LIT>'] is not None:<EOL><INDENT>readcols = set(read_kw['<STR_LIT>'])<EOL>propcols = _get_property_columns(tableclass, convert_kw['<STR_LIT>'])<EOL>for col in propcols:<EOL><INDENT>try:<EOL><INDENT>readcols.remove(col)<EOL><DEDENT>except KeyError:<EOL><INDENT>continue<EOL><DEDENT>readcols.update(propcols[col])<EOL><DEDENT>read_kw['<STR_LIT>'] = list(readcols)<EOL><DEDENT><DEDENT>return Table(read_ligolw_table(source, tablename=tablename, **read_kw),<EOL>**convert_kw)<EOL>
Read a `Table` from one or more LIGO_LW XML documents

    source : `file`, `str`, :class:`~ligo.lw.ligolw.Document`, `list`
        one or more open files, file paths, or LIGO_LW `Document` objects

    tablename : `str`, optional
        the `Name` of the relevant `Table` to read, if not given a table will
        be returned if only one exists in the document(s)

    **kwargs
        keyword arguments for the read, or conversion functions

    See Also
    --------
    gwpy.io.ligolw.read_table
        for details of keyword arguments for the read operation
    gwpy.table.io.ligolw.to_astropy_table
        for details of keyword arguments for the conversion operation