Fix example for adding detector using a callable.
Merge pull request #2094 from ADmad/3.0

Fix example for adding detector using a callable.