Moved check that file is finished writing from dat.py to engine.py as sleep was slowing offline processing. Weighted averaging in dat.py. Interpolation (fractional offset) in offsetsubtract