Pad dig_data with its last element so that the new array is a
        multiple of n.

def padDigitalData(self, dig_data, n):
        """Pad dig_data with its last element so that the new array is a
        multiple of n.
        """
        n = int(n)
        l0 = len(dig_data)
        if l0 % n == 0:
            return dig_data  # no need of padding
        else:
            ladd = n - (l0 % n)
            dig_data_add = np.zeros(ladd, dtype="uint32")
            dig_data_add.fill(dig_data[-1])
            return np.concatenate((dig_data, dig_data_add))