avg_corr_mat outputs to an HDF5 dataset