Editing trains of action potentials from multi-electrode arrays