docs: def integer_decimation(data, decimation_factor):
      """
      Downsampling by applying a simple integer decimation.
  
      Make sure that no signal is present in frequency bands above the new
      Nyquist frequency (samp_rate/2/decimation_factor), e.g. by applying a
      lowpass filter beforehand!
      New sampling rate is old sampling rate divided by decimation_factor.
  
      :type data: numpy.ndarray
      :param data: Data to filter.
      :param decimation_factor: Integer decimation factor
      :return: Downsampled data (array length: old length / decimation_factor)
      """
      if not isinstance(decimation_factor, int):
          msg = "Decimation_factor must be an integer!"
          raise TypeError(msg)
  
      # reshape and only use every decimation_factor-th sample
      data = np.array(data[::decimation_factor])
      return data