Using MTH5 on a dataset sampled at 31250 Hz and calling run_ts.resample_poly(7812) failed. The initial xarray had 165714 samples.
This seems to be because the time axis is being sliced by taking every fourth sample, but the data are being passed through resample_poly which can have a different number of samples than a slice.
The actual error occurs in mth5/timeseries/scipy_filters.py
One solution is to do this:
ret[dim] = new_dim[:len(ret.time)]
instead of
ret[dim] = new_dim
but a warning should also be logged if the two axes are of unequal length
Using MTH5 on a dataset sampled at 31250 Hz and calling run_ts.resample_poly(7812) failed. The initial xarray had 165714 samples.
This seems to be because the time axis is being sliced by taking every fourth sample, but the data are being passed through resample_poly which can have a different number of samples than a slice.
The actual error occurs in
mth5/timeseries/scipy_filters.py
One solution is to do this:
ret[dim] = new_dim[:len(ret.time)]
instead ofret[dim] = new_dim
but a warning should also be logged if the two axes are of unequal length