def create_blank_udic(ndim):
    """
    Create a blank universal dictionary for a spectrum of dimension ndim.
    """
    udic = dict()
    udic['ndim'] = ndim
    for i in range(ndim):
        d = dict()
        d['sw'] = 999.99
        d['complex'] = True
        d['obs'] = 999.99
        d['car'] = 999.99
        d['size'] = 1
        d['label'] = ['X', 'Y', 'Z', 'A'][i]
        if i == ndim - 1:
            d['encoding'] = 'direct'
        else:
            d['encoding'] = 'states'
        d['time'] = True
        d['freq'] = False
        udic[i] = d
    return udic
