Reparameterising threshold detection functon.