python/avg_q/t_detector.py: Merged measure_conditions() fix