def filter_curves(curves, param, values, exlude_vals=None):
    """Filter curves after given parameter and/or exclude values

    Parameters
    ----------
    curves : array_like of curves
        all curves
    param : str
        key of parameter to use for filtering
    values : array_like of float
        list fo values to include
    exlude_vals : array_like of float
        list fo values to exclude
    Returns
    -------
    filtered_curves : list of Curve
    """
    if not param:
        return None
    out = []
    for curve in curves:
        val = curve.params.get(param)
        in_range = (values[0] <= val) and (val <= values[1])
        if in_range:
            if exlude_vals:
                if val in exlude_vals:
                    continue
            out.append(curve)

    return out