import numpy as np
from scipy import signal


def find_sideband(ft_data, which=+1, copy=True):
    """Find the side band position of a hologram

    The hologram is Fourier-transformed and the side band
    is determined by finding the maximum amplitude in
    Fourier space.

    Parameters
    ----------
    ft_data: 2d ndarray
        FFt-shifted Fourier transform of the hologram image
    which: +1 or -1
        which sideband to search for:

        - +1: upper half
        - -1: lower half
    copy: bool