예제 #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']