Sample reduction script for absolute/relative units

minor modifications and comments