added _get_histogram_periodic and modified r2.mat (intensities, positions) and modified read_mat