def cropImage(image, crop_bottom, crop_top, crop_left, crop_right):
    """Crop an image.

    Parameters
    ----------
    image : numpy array
        The image that is to be cropped
    crop_bottom, crop_top, crop_left, crop : int
        How many pixels to crop in each of these directions

    Returns
    -------
      image: array
          The image that has been cropped
    """

    if crop_bottom == 0:
        image = image[crop_top:]
    else:
        image = image[crop_top:-crop_bottom]
    if crop_right == 0:
        image = image[:, crop_left:]
    else:
        image = image[:, crop_left:-crop_right]

    return image