def put_dic(f, dic, dataset='spectrum'):
    """
    Put a dictionary to the dataset in a HDF5 File
    """
    dset = f[dataset]
    for key, value in dic.items():
        if type(key) == int and type(value) == dict:
            axis = key
            for axiskey, axisvalue in value.items():
                fullkey = str(axis) + '_' + axiskey
                dset.attrs[fullkey] = axisvalue
        else:
            dset.attrs[key] = value
    return
