def clear_inl(): """ Clear the INL registers on teh ADC """ offs = [0.0] * 17 for chan in range(1, 5): adc5g.set_inl_registers(roach2, zdok, chan, offs)
def clear_inl(): """ Clear the INL registers on teh ADC """ offs = [0.0]*17 for chan in range(1,5): adc5g.set_inl_registers(roach2, zdok, chan, offs)
def clear_inl(self, chans=[0, 1, 2, 3]): """ Sets INL to 0 for all channels in 'chans' """ inl0 = np.zeros(17) for chan in chans: zdok, cores = self.get_channel_core_spi(chan) for core in cores: adc5g.set_inl_registers(self.roach, zdok, core, inl0)
def clear_inl(self, chans = [0,1,2,3]): """ Sets INL to 0 for all channels in 'chans' """ inl0 = np.zeros(17) for chan in chans: zdok, cores = self.get_channel_core_spi(chan) for core in cores: adc5g.set_inl_registers(self.roach, zdok, core, inl0)
def set_inl(self, chan, inl_chan): """ Sets INL for two cores of channel 'chan' inl_chan is format (inl1, inl2) """ zdok, cores = self.get_channel_core_spi(chan) i = 0 for core in cores: inl1, inl2 = inl_chan adc5g.set_inl_registers(self.roach, zdok, core, inl1) adc5g.set_inl_registers(self.roach, zdok, core, inl2) i += 1
def set_inl(fname = 'inl'): """ Set the INL registers for all four cores from a file containing 17 rows of 5 columns. The first column contains the level and is ignored. Columns 2-5 contain the inl correction for cores a-d """ c = np.genfromtxt(fname, usecols=(1,2,3,4), unpack=True) adc5g.set_inl_registers(roach2,zdok,1,c[0]) adc5g.set_inl_registers(roach2,zdok,2,c[1]) adc5g.set_inl_registers(roach2,zdok,3,c[2]) adc5g.set_inl_registers(roach2,zdok,4,c[3])
def set_inl(fname='inl'): """ Set the INL registers for all four cores from a file containing 17 rows of 5 columns. The first column contains the level and is ignored. Columns 2-5 contain the inl correction for cores a-d """ c = np.genfromtxt(fname, usecols=(1, 2, 3, 4), unpack=True) adc5g.set_inl_registers(roach2, zdok, 1, c[0]) adc5g.set_inl_registers(roach2, zdok, 2, c[1]) adc5g.set_inl_registers(roach2, zdok, 3, c[2]) adc5g.set_inl_registers(roach2, zdok, 4, c[3])
def set_inl(fname=None): """ Set the INL registers for all four cores from a file containing 17 rows of 5 columns. The first column contains the level and is ignored. Columns 2-5 contain the inl correction for cores a-d fname defaults to the standard name in /instance/configFiles on the roach """ global inl_name if fname == None: fname = inl_name c = np.genfromtxt(fname, usecols=(1, 2, 3, 4), unpack=True) adc5g.set_inl_registers(roach2, zdok, 1, c[0]) adc5g.set_inl_registers(roach2, zdok, 2, c[1]) adc5g.set_inl_registers(roach2, zdok, 3, c[2]) adc5g.set_inl_registers(roach2, zdok, 4, c[3])
def set_inl(fname = None): """ Set the INL registers for all four cores from a file containing 17 rows of 5 columns. The first column contains the level and is ignored. Columns 2-5 contain the inl correction for cores a-d fname defaults to the standard name in /instance/configFiles on the roach """ global inl_name if fname == None: fname = inl_name c = np.genfromtxt(fname, usecols=(1,2,3,4), unpack=True) adc5g.set_inl_registers(roach2,zdok,1,c[0]) adc5g.set_inl_registers(roach2,zdok,2,c[1]) adc5g.set_inl_registers(roach2,zdok,3,c[2]) adc5g.set_inl_registers(roach2,zdok,4,c[3])