downsample and convert to HDF5