def make_ds_list(cell, limit=2.0):
    """
    Generates a list of d-spacings
    """
    print('Generating hkls with unit cell:', cell)
    cell.makerings(limit)
    ds_list = []
    keys = list(cell.ringhkls.keys())
    keys.sort()
    ptype = 0
    for ky in keys:
        ptype = ptype + 1
        ds = ky
        hklmax = -10000000000.0
        hmax = -10000000000.0
        kmax = -10000000000.0
        hkls_in_ring = cell.ringhkls[ky]
        hkls_in_ring.sort()
        hkls_in_ring.reverse()
        print(hkls_in_ring)
        for h, k, l in hkls_in_ring:
            if h + k + l >= hklmax and h >= hmax and k > kmax:
                hklmax = h + k + l
                hmax = h
                kmax = k
                ds_string = '(%d%d%d)' % (h, k, l)
        ds_list.append([ds, ptype, ds_string])
    return ds_list
