def threshold_img(img, t):
    """Binarize input image by intensity thresholding

    Parameters
    ----------
    img : ndarray
        image to threshold
    t : float
        intensity threshold value

    Returns
    -------
    mask : ndarray
        thresholded img (binary)

    """
    return (img > t)