Modified sweep frequency script to reset at end

Modified the sweep_rate_and_trap_study script to reset at the end of a
successful run!