def bgd_func(qcut, iqcutStart, iqcutEnd):
    """Linear background function

    Equation of a line used to eliminate the background of the sample data.

    Parameters
    ----------
    `qcut` : ndrray
             Q values of the sample data after it's been cut. First and last
             values are used to determine slope.
    `iqcutStart` : float
                   The first I(Q) value of the data after it has been cut again
                   based on the model from the Materials Project.
    `iqcutEnd` : float
                 The last I(Q) value of the data after it has been cut again
                 based on the model from the Materials Project.

    Notes
    -----
    This function may be modified to use a different background function.
    A higher order polynomial may provide a better fit than a line.

    """

    a1 = (iqcutEnd-iqcutStart)/(qcut[-1]-qcut[0])
    a0 = iqcutStart-(qcut[0]*(a1))
    return a0 + a1*qcut