def zerotime(acqu):
    """get digital filter parameters, if any
    
  The zerotime function computes the correction for the Bruker figital filter.
  the phase correction to apply is computed given the 3 parameters :
  DSPFIRM DSPFVS DECIM
  as found in the acqus parameter file in XwinNMR

  correction is then -360*zerotime in firstorder correction

  dspfvs is not used so far
  oct 2006
  """
    tabdelay = [[179, 201, 533, 709, 1097, 1449, 2225, 2929, 4481, 5889, 
        8993, 11809, 18017, 23649, 36065, 47329, 72161, 94689, 144353, 
        189409, 288737], [184, 219, 384, 602, 852, 1668, 2312, 3368, 4656, 
        6768, 9344, 13568, 18560, 27392, 36992, 50040, 73856, 110336, 
        147584, 220928, 295040], [184, 219, 384, 602, 852, 1668, 2292, 3369,
        4616, 6768, 9264, 13568, 18560, 27392, 36992, 50040, 73856, 110336,
        147584, 220928, 295040], [11, 17, 23, 35, 47, 71, 95, 143, 191, 287,
        383, 575, -1, -1, -1, -1, -1, -1, -1, -1, -1], [60, 90, 118, 179, 
        244, 360, 492, 724, 980, 1444, 1958, 2886, 3912, 5768, 7820, 11532,
        -1, -1, -1, -1, -1], [-1, -1, 58, 152, 202, 318, 418, 642, 842, 
        1290, 1690, 2586, 3386, -1, -1, -1, -1, -1, -1, -1, -1]]
    decim_offset = [2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 
        256, 384, 512, 768, 1024, 1536, 2048]
    try:
        decim = int(float(acqu['$DECIM']))
    except:
        decim = 1
    if decim != 1:
        dspfvs = int(acqu['$DSPFVS'])
        dspfirm = int(acqu['$DSPFIRM'])
        if dspfvs >= 20 and dspfvs <= 23:
            zerotimeposition = float(acqu['$GRPDLY'])
            return zerotimeposition
        if dspfvs == 15 and decim == 3 and float(acqu['$SW_h']) >= 104000:
            z = -110.0 / decim
            zerotimeposition = z / 2
            return zerotimeposition
        if dspfvs == 0 or decim == 1:
            return 0.0
        try:
            j = decim_offset.index(decim)
        except:
            raise '*** wrong value for DECIM'
        try:
            d = tabdelay[dspfvs - 10][j]
        except:
            raise ('*** wrong value for DSPFVS ' + dspfirm)
        if d == -1:
            raise '*** wrong DECIM/DSPFVS parameter combination'
        z = float(d) / float(decim)
        zerotimeposition = z / 2
        return zerotimeposition
    else:
        zerotimeposition = 0.0
        return zerotimeposition
    return zerotimeposition
