A method for determining threshold from single-unit neural activity