Timing and discrimination of shock density in avoidance.