@staticmethod
def _imgnormcompress(img):
    """
        Compress normalized image. Values:
        > 1 -> 1
        < 0 -> 0
        """
    mask_pass = (img <= 1) * (img >= 0)
    mask_high = img > 1
    return mask_pass * img + mask_high
