示例#1
0
 def fft_shift_get(self):
     """
     Fetches the current FFT shifting schedule from the hardware.
     """
     self.config['fft_shift'] = self.fpga.read_uint('fft_shift')
     self.config['fft_scale'] = 2 ** (cal.bitcnt(self.config['fft_shift']))
     return self.config['fft_shift']
示例#2
0
文件: cam.py 项目: jmanley/ratty2
 def fft_shift_set(self,fft_shift_schedule=-1):
     """Sets the FFT shift schedule (divide-by-two) on each FFT stage. 
         Input is an integer representing a binary bitmask for shifting.
         If not specified as a parameter to this function (or a negative value is supplied), program the default level."""
     if fft_shift_schedule<0: fft_shift_schedule=self.fft_shift
     self.fpga.write_int('fft_shift',fft_shift_schedule)
     self.fft_shift=fft_shift_schedule
     self.fft_scale=2**(cal.bitcnt(fft_shift_schedule))
     self.logger.info("Set FFT shift to %8x (scaling down by %i)."%(fft_shift_schedule,self.fft_scale))
示例#3
0
 def fft_shift_set(self,fft_shift_schedule=None):
     """Sets the FFT shift schedule (divide-by-two) on each FFT stage. 
         Input is an integer representing a binary bitmask for shifting.
         If not specified as a parameter to this function, set the default level from the config file."""
     if fft_shift_schedule==None: fft_shift_schedule=self.config['fft_shift']
     self.fpga.write_int('fft_shift',fft_shift_schedule) 
     self.config['fft_shift']=fft_shift_schedule
     self.config['fft_scale']=2**(cal.bitcnt(fft_shift_schedule))
     self.logger.info("Set FFT shift to %8x (scaling down by %i)."%(fft_shift_schedule,self.config['fft_scale']))
示例#4
0
 def fft_shift_set(self, fft_shift_schedule=-1):
     """Sets the FFT shift schedule (divide-by-two) on each FFT stage. 
         Input is an integer representing a binary bitmask for shifting.
         If not specified as a parameter to this function (or a negative value is supplied), program the default level."""
     if fft_shift_schedule < 0: fft_shift_schedule = self.fft_shift
     self.fpga.write_int('fft_shift', fft_shift_schedule)
     self.fft_shift = fft_shift_schedule
     self.fft_scale = 2**(cal.bitcnt(fft_shift_schedule))
     self.logger.info("Set FFT shift to %8x (scaling down by %i)." %
                      (fft_shift_schedule, self.fft_scale))
示例#5
0
 def fft_shift_get(self):
     """Fetches the current FFT shifting schedule from the hardware."""
     self.config['fft_shift']=self.fpga.read_uint('fft_shift')
     self.config['fft_scale']=2**(cal.bitcnt(self.config['fft_shift']))
     return self.config['fft_shift']