Added a function to plot amplitude vs frequency for the oscilloscope traces
Fixed a bug in the position-cleaning code