def METHOD_NAME(self, channel, frequency):
    assert channel > 0, "setFrequency: channel out of range " + str(channel)
    assert channel <= self.number_channels, "setFrequency: channel out of range " + str(channel) 
    self.setActiveChannel(channel)
    cmd = "fr " + "{0:.3f}".format(frequency)
    self.commWithResp(cmd)