def METHOD_NAME(self, current, channel=1, verbose=True):  # current in mA
    """
    set current of channel ch
    """
    try:
        val = np.round(-0.5 * (self.range_limits[channel - 1][0] + self.range_limits[channel - 1][-1]) + (
                    current * 1000 * np.power(10., -dac_val[self.c_ranges[channel - 1]])), 10)  # dac value in mV
        if val < -2000 or val > 2000:
            raise ValueError('DAC range limits exceeded')
        else:
            if 10. * val != np.round(10. * val) and verbose:
                logging.warning('16 bit resolution may be visible for the current value you are attempting to set.')
            val = np.power(10., -dac_val[self.c_ranges[channel - 1]]) * current * 1000  # dac is in mV
            self.IVVI.set_dac(self.dacs[channel - 1], val)
    except IndexError as detail:
        logging.error('Electronics might be disconnected.')
        raise detail