one_threshold function

Calculates the threshold for one condition one_threshold calculates the threshold for one condition one_threshold