parameters: (device_sr, symbol_rate)
return_statement: return 0 if i < 1 else i - 1
docstring: Calculate ideal decimation and return as log2
docstring_summary: Calculate ideal decimation and return as log2
docstring_tokens: Calculate ideal decimation and return as log2
function: def calc_decim(device_sr, symbol_rate):
      """ Calculate ideal decimation and return as log2 """
  # ----------------------------------------------------------------------
      quot = device_sr // (2*symbol_rate*1000)
      for i in range(6):
          if quot < 1<<i:
              break
      return 0 if i < 1 else i - 1
function_tokens: def calc_decim ( device_sr , symbol_rate ) : # ---------------------------------------------------------------------- quot = device_sr // ( 2 * symbol_rate * 1000 ) for i in range ( 6 ) : if quot < 1 << i : break return 0 if i < 1 else i - 1