def ext_mid(data):
    """
    Extract the middle of the spectrum.

    Parameters
    ----------
    data : ndarray
        Array of NMR data.

    Returns
    -------
    ndata : ndarray
        Middle half of spectrum.

    """
    return data[(...), int(data.shape[-1] * 1.0 / 4.0):int(data.shape[-1] *
        3.0 / 4.0)]
