Updates to analyze_dets.py.