code: def get_current(self, channel, unit='A'):
          '''Reading current
          '''
          kwargs = self._ch_map[channel]['ADCI']
          current_raw = self._get_adc_value(**kwargs)
          voltage = self.get_voltage(channel)
  
          current_raw_iq = current_raw - (self._ch_cal[channel]['ADCI']['iq_offset'] + self._ch_cal[channel]['ADCI']['iq_gain'] * voltage)  # quiescent current (IQ) compensation
          current = (current_raw_iq - self._ch_cal[channel]['ADCI']['offset']) / self._ch_cal[channel]['ADCI']['gain']
  
          if unit == 'raw':
              return current_raw
          elif unit == 'raw_iq':
              return current_raw_iq
          elif unit == 'A':
              return current
          elif unit == 'mA':
              return current * 1000
          elif unit == 'uA':
              return current * 1000000
          else:
              raise TypeError("Invalid unit type."f get_current(self, channel, unit='A'):
          '''Reading current
          '''
          kwargs = self._ch_map[channel]['ADCI']
          current_raw = self._get_adc_value(**kwargs)
          voltage = self.get_voltage(channel)
  
          current_raw_iq = current_raw - (self._ch_cal[channel]['ADCI']['iq_offset'] + self._ch_cal[channel]['ADCI']['iq_gain'] * voltage)  # quiescent current (IQ) compensation
          current = (current_raw_iq - self._ch_cal[channel]['ADCI']['offset']) / self._ch_cal[channel]['ADCI']['gain']
  
          if unit == 'raw':
              return current_raw
          elif unit == 'raw_iq':
              return current_raw_iq
          elif unit == 'A':
              return current
          elif unit == 'mA':
              return current * 1000
          elif unit == 'uA':
              return current * 1000000
          else:
              raise TypeError("Invalid unit type.")
docs: Reading current