Automated detection of extracellular action potentials from single neurons