TimeSeries.find() "pad" argument seems to be a no-op
Created by: jrollins
The 'pad' keyword argument to the TimeSeries.find() method seems to not do anything:
In [1]: import gwpy.timeseries
In [2]: gwpy.timeseries.TimeSeries.find('L1:GRD-ISC_LOCK_STATE_N', 1166404240, 1166414240)
Missing segments:
[1166411584 ... 1166412992)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-30256ac88366> in <module>()
----> 1 gwpy.timeseries.TimeSeries.find('L1:GRD-ISC_LOCK_STATE_N', 1166404240, 1166414240)
...
/usr/lib/python2.7/site-packages/gwpy/types/series.pyc in append(self, other, gap, inplace, pad, resize)
633 "Cannot append discontiguous {0}\n"
634 " {0} 1 span: {1}\n {0} 2 span: {2}".format(
--> 635 type(self).__name__, self.xspan, other.xspan))
636
637 # check empty other
ValueError: Cannot append discontiguous TimeSeries
TimeSeries 1 span: [1166404240.0 ... 1166411584.0)
TimeSeries 2 span: [1166412992.0 ... 1166414240.0)
In [3]: gwpy.timeseries.TimeSeries.find('L1:GRD-ISC_LOCK_STATE_N', 1166404240, 1166414240, pad=0)
Missing segments:
[1166411584 ... 1166412992)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-e07756038ea3> in <module>()
----> 1 gwpy.timeseries.TimeSeries.find('L1:GRD-ISC_LOCK_STATE_N', 1166404240, 1166414240, pad=0)
...
/usr/lib/python2.7/site-packages/gwpy/types/series.pyc in append(self, other, gap, inplace, pad, resize)
633 "Cannot append discontiguous {0}\n"
634 " {0} 1 span: {1}\n {0} 2 span: {2}".format(
--> 635 type(self).__name__, self.xspan, other.xspan))
636
637 # check empty other
ValueError: Cannot append discontiguous TimeSeries
TimeSeries 1 span: [1166404240.0 ... 1166411584.0)
TimeSeries 2 span: [1166412992.0 ... 1166414240.0)
Same error in both cases, but I would expect (based on the documentation) that the second call to return a TimeSeries object with the unavailable data filled in with zeros.