StateVector.get calling fetch can't handle bits
A call to StateVector.get
that results in a fetch()
raises a TypeError
when the bits argument is used:
>>> from gwpy.timeseries import StateVector
>>> StateVector.get('L1:ISI-ETMX_ODC_CHANNEL_OUT_DQ', 'May 22 2014 14:00', 'May 22 2014 15:00', bits=range(8), verbose=True)
<class 'gwpy.timeseries.statevector.StateVectorDict'>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/duncan.macleod/opt/gwpysoft/lib/python2.6/site-packages/gwpy/timeseries/core.py", line 344, in get
**kwargs)[str(channel)]
File "/home/duncan.macleod/opt/gwpysoft/lib/python2.6/site-packages/gwpy/timeseries/core.py", line 1026, in get
verbose=verbose, **kwargs)
File "/home/duncan.macleod/opt/gwpysoft/lib/python2.6/site-packages/gwpy/utils/deps.py", line 82, in wrapper
return func(*args, **kwargs)
TypeError: fetch() got an unexpected keyword argument 'bits'
There are two possible fixes as far as I can see
- overwrite
StateVector.get
to handle bits itself, or - overwrite
StateVectorDict.fetch
to handle bits