Table.read(format='txt') doesn't allow loadtxt kwargs
The Table.read()
unified IO method for formats txt
and csv
doesn't accept other kwargs that can be passed to numpy.loadtxt
:
>>> events = MultiBurstTable.read('/home/marissa.walker/L1_cwb_Feb28_2015/report/postprod/M1.R_RSRA_i0cc60_i1rho0_freq64_2048/data/EVENTS.txt', columns=['snr', 'flow', 'fhigh', 'duration', 'time'], usecols=[2, 13, 14, 15, 20])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/mnt/qfs4/duncan.macleod/<ipython console> in <module>()
/home/duncan.macleod/.local/lib/python2.6/site-packages/astropy-1.0.1-py2.6-linux-x86_64.egg/astropy/io/registry.pyc in read(cls, *args, **kwargs)
324
325 reader = get_reader(format, cls)
--> 326 data = reader(*args, **kwargs)
327
328 if not isinstance(data, cls):
TypeError: table_from_ascii_rows() got an unexpected keyword argument 'usecols'
run from the LIGO-CIT data centre. I think just passing kwargs onto numpy.loadtxt
is the easiest way to go.