Fixed missing import of pi
Added line to TestPattern to fix GUI auto-refresh
Made fixes to measure_response