def _handle_data(self, data): # Do user callbacks first for callback in self.callbacks: callback(data) # Send data to dataCatcher/corrSaver for baseline in data.baselines: # Get our data arrays baseline_data = data[baseline] # Send the appropriate chunk if baseline.is_valid(): # Get baseline antennas ant_left = baseline.left._ant ant_right = baseline.right._ant # Get the chunk chunk = baseline.left._chk # Get baseline polarizations pol_left = baseline.left._pol pol_right = baseline.right._pol # Get each sidebands data usb_data = baseline_data[chunk]["USB"] if baseline.is_auto(): lsb_data = usb_data.copy() else: lsb_data = baseline_data[chunk]["LSB"] # Send our integration send_integration( data.int_time - (data.int_length / 2.0), data.int_length, chunk, ant_left, pol_left, ant_right, pol_right, lsb_data, usb_data, 0, ) # Debug log this baseline self.logger.debug("processed baseline: {!s}".format(baseline)) # Info log the set self.logger.info("processed all baselines")
import time import random import pysendint amp = 1e9 antennas = range(2, 9) #lsbCross = [0.0,] * 2**15 #usbCross = [0.0,] * 2**15 now = time.time(); print now for chunk in [0, 1]: for i in antennas: for j in antennas: lsbCross = list(amp*random.random() for p in range(2**15)) usbCross = list(amp*random.random() for p in range(2**15)) print i, j, pysendint.send_integration(time.time(), 32.0, chunk, i, 1, j, 1, lsbCross, usbCross, 0)