def average_current(self):
        """Average current in the unit of mA.
        """
        len_data_pt = len(self.data_points)
        if len_data_pt == 0:
            return 0
        cur = sum(self.data_points) * 1000 / len_data_pt
        return round(cur, self.sr)
Average current in the unit of mA.