mostly fixed check_positions and started logging gain and offset at top of data files
updated tests to check for gain and offset