def neg_edges(data):
    """
    Negate edge half (non-middle) of spectra.
    """
    data[(...), :int(data.shape[-1] * 1.0 / 4)] = -data[(...), :int(data.
        shape[-1] * 1.0 / 4)]
    data[(...), int(data.shape[-1] * 3.0 / 4):] = -data[(...), int(data.
        shape[-1] * 3.0 / 4):]
    return data
