merge origin/master
fix some conflicts
fix a bug in collapse_data.f90
in the middle of debugging, move_measuring_index