Modeling and detecting action potentials from extra-cellular recordings under low signal-to-noise ratio