better function to test that signals are equivalent

Added a helper to test that signals are approx equal taking into account the amplitude of the signal (using modulo). Also added a few tests for this helper.