functions for testing frequency sweeps