def insert_derived_spline(spline_dictionary, spline_keys, derived_quantity,
    log=print):
    """Inserts a spline into a dictionary of horizon splines

    Derived from Horizons.h5.  Note: spline_keys is a vector of key
    names (should be length 1 for scalars, length 3 for vectors), where
    each key is the name of a group that will be written in the LVC
    file, such as Omega-vs-time or LNhatx-vs-time; and derived_quantity
    is the quantity to be splined.  The derived_quantity should be
    computed using derived_horizon_quantities_from_sxs().

    """
    from . import LVCDataset
    log('Computing ' + str(spline_keys))
    times_AH = derived_quantity[:, (0)]
    quantity_AH = derived_quantity[:, 1:]
    for i, spline_key in enumerate(spline_keys):
        spline_dictionary[spline_key] = LVCDataset.from_data(times_AH,
            quantity_AH[:, (i)], tol=1e-06)
