def _line_exists(wavelengths, y, z, x0, xRes, fluxMin):
    """For a group of lines finds if the there is some change in flux greater
    than some minimum at the same redshift with different initial wavelengths

    **Parameters**

    :wavelengths: (N) ndarray

        array of initial wavelengths to check

    :y: (N) ndarray

        flux array to check

    :x0: float

        wavelength of the first value in y

    :xRes: float

        difference in wavelength between consecutive cells in flux array

    :fluxMin: float

        maximum flux to count as a line existing.

    **Returns**

    :flag: boolean

        value indicating whether all lines exist. True if all lines exist
    """
    for wl in wavelengths:
        redWl = (z + 1) * wl
        indexRedWl = (redWl - x0) / xRes
        if indexRedWl > len(y):
            return False
        if y[int(indexRedWl)] > fluxMin:
            return False
    return True
