think I have downsampling working, can finish bias correct tomorrow
adjusted frequency computations a bit in resample()
added simple segmentation tool