def METHOD_NAME(self, range, channel=1):
    """
    set the current range of channel ch
    """
    if range in dac_val:
        self.c_ranges[channel - 1] = range
    else:
        logging.error('Invalid current range.')