Up and down resampling of a time-series