Experimental code to clean up the signal by averaging 1000 samples