def detName(i, new=0):
    """
    detName(i,new=0) - this function returns the detector name Di used in sscan record
    where
      i - specify the zero based detector sequence number
      new - 1 specify the version 5 Di names desired, default 0
    """
    if new:
        return 'D%02d' % (i + 1)
    if i < 15:
        return 'D%s' % hex(i + 1)[2].upper()
    elif i < 85:
        return 'D%02d' % (i - 14)
    else:
        return '?'
