def put_dic(f, dic, dataset="spectrum"):

    # select the data set
    dset = f[dataset]

    for key, value in dic.items():

        # axis dictionaries
        if type(key) == int and type(value) == dict:
            axis = key
            for axiskey, axisvalue in value.items():
                fullkey = str(axis) + "_" + axiskey
                dset.attrs[fullkey] = axisvalue

        # simple value
        else:
            dset.attrs[key] = value
    return


# glue_* objects
Put a dictionary to the dataset in a HDF5 File
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/glue.py/put_dic