def flagsFromBoundaries(eta, boundaries_dict):
    """Given lower and upper cutoffs, return arrays of Boolean flags.

    Parameters
    ----------
    eta: array like
        Pixel coordinates in cross-dispersion direction.

    boundaries_dict: dictionary
        Key is a stripe name, value is a tuple with the lower and upper Y
        boundaries for that stripe.

    Returns
    -------
    dictionary of boolean arrays
        Dictionary with stripe name ("NUVA", "NUVB", "NUVC") as the key
        and an array of Boolean flags as the value, True for events for
        which the Y coordinate is within the regions for the PSA.
    """
    region_flags_dict = {}
    for key in boundaries_dict:
        lower, upper = boundaries_dict[key]
        region_flags_dict[key] = (eta >= lower) & (eta < upper)
    return region_flags_dict
