decimate_tsd() initial version

does not yet work with multidimensional data