def _detection_limit_index(obs, cohn):
 if (cohn.shape[0] > 0):
  (index,) = numpy.where((cohn['lower_dl'] <= obs))
  det_limit_index = index[(-1)]
 else:
  det_limit_index = 0
 return det_limit_index

def _detection_limit_index ( obs , cohn ) : if ( cohn . shape [ 0 ] > 0 ) : ( index , ) = numpy . where ( ( cohn [ 'lower_dl' ] <= obs ) ) det_limit_index = index [ ( - 1 ) ] else : det_limit_index = 0 return det_limit_index
locates the corresponding detection limit for each observation .