def fixzero(image, to_mean=False):
    """ Add a constant to all the data to move the minimum (or the mean value) to zero

    Args:
        image: numpy array.
        to_mean: bool, optional. If true move mean value to zero, if false move mimimum to zero (default).

    Returns:
        numpy array.
    """
    if to_mean:
        fixed = image - image.mean()
    else:
        fixed = image - image.min()
    return fixed
