Update detector.py

Ooops.  pushed an unmerged copy :-/