def data_to_delays(self, **kwargs): '''data = dictionary of visibilities. info = FirstCalRedundantInfo class can give it kwargs: supports 'window': window function for fourier transform. default is none 'tune' : to fit and remove a linear slope to phase. 'plot' : Low level plotting in the red.redundant_bl_cal_simple script. 'clean' : Clean level when deconvolving sampling function out. Returns 2 dictionaries: 1. baseline pair : delays 2. baseline pari : offset ''' verbose = kwargs.get('verbose', False) blpair2delay = {} blpair2offset = {} blpair2noise = {} dd = self.info.order_data(self.data) ww = self.info.order_data(self.wgts) for (bl1, bl2) in self.info.bl_pairs: if verbose: print(bl1, bl2) d1 = dd[:, :, self.info.bl_index(bl1)] w1 = ww[:, :, self.info.bl_index(bl1)] d2 = dd[:, :, self.info.bl_index(bl2)] w2 = ww[:, :, self.info.bl_index(bl2)] delay, offset = red.redundant_bl_cal_simple( d1, w1, d2, w2, self.fqs, **kwargs) blpair2delay[(bl1, bl2)] = delay blpair2offset[(bl1, bl2)] = offset blpair2noise[(bl1, bl2)] = noiseproxy return blpair2delay, blpair2offset, blpair2noise
def data_to_delays(self, **kwargs): '''data = dictionary of visibilities. info = FirstCalRedundantInfo class can give it kwargs: supports 'window': window function for fourier transform. default is none 'tune' : to fit and remove a linear slope to phase. 'plot' : Low level plotting in the red.redundant_bl_cal_simple script. 'clean' : Clean level when deconvolving sampling function out. Returns 2 dictionaries: 1. baseline pair : delays 2. baseline pari : offset ''' verbose = kwargs.get('verbose', False) blpair2delay = {} blpair2offset = {} blpair2noise = {} dd = self.info.order_data(self.data) ww = self.info.order_data(self.wgts) for (bl1,bl2) in self.info.bl_pairs: if verbose: print (bl1, bl2) d1 = dd[:,:,self.info.bl_index(bl1)] w1 = ww[:,:,self.info.bl_index(bl1)] d2 = dd[:,:,self.info.bl_index(bl2)] w2 = ww[:,:,self.info.bl_index(bl2)] delay,offset = red.redundant_bl_cal_simple(d1,w1,d2,w2,self.fqs,**kwargs) blpair2delay[(bl1,bl2)] = delay blpair2offset[(bl1,bl2)] = offset blpair2noise[(bl1,bl2)] = noiseproxy return blpair2delay, blpair2offset, blpair2noise
def data_to_delays(self, verbose=False, **kwargs): '''data = dictionary of visibilities. info = FirstCalRedundantInfo class can give it kwargs: supports 'window': window function for fourier transform. default is none 'tune' : to fit and remove a linear slope to phase. 'plot' : Low level plotting in the red.redundant_bl_cal_simple script. 'clean' : Clean level when deconvolving sampling function out. Returns 2 dictionaries: 1. baseline pair : delays 2. baseline pari : offset ''' window=kwargs.get('window','none') tune=kwargs.get('tune',True) plot=kwargs.get('plot',False) clean=kwargs.get('clean',1e-4) # use_offset = kwargs.get('use_offset',False) blpair2delay = {} blpair2offset = {} dd = self.info.order_data(self.data) ww = self.info.order_data(self.wgts) for (bl1,bl2) in self.info.bl_pairs: if verbose: print (bl1, bl2) d1 = dd[:,:,self.info.bl_index(bl1)] w1 = ww[:,:,self.info.bl_index(bl1)] d2 = dd[:,:,self.info.bl_index(bl2)] w2 = ww[:,:,self.info.bl_index(bl2)] if True: delay,offset = red.redundant_bl_cal_simple(d1,w1,d2,w2,self.fqs,window=window,tune=tune,plot=plot,verbose=verbose,clean=clean) if False: _,(delay,offset),_ = red.redundant_bl_cal(d1,w1,d2,w2,self.fqs,window=window,verbose=verbose,use_offset=use_offset) blpair2delay[(bl1,bl2)] = delay blpair2offset[(bl1,bl2)] = offset return blpair2delay, blpair2offset
def data_to_delays(self, verbose=False, **kwargs): '''data = dictionary of visibilities. info = FirstCalRedundantInfo class can give it kwargs: supports 'window': window function for fourier transform. default is none Returns a dictionary with keys baseline pairs and values delays.''' window=kwargs.get('window','none') tune=kwargs.get('tune','True') self.blpair2delay = {} dd = self.info.order_data(self.data) # ww = self.info.order_data(self.wgts) for (bl1,bl2) in self.info.bl_pairs: if verbose: print (bl1, bl2) d1 = dd[:,:,self.info.bl_index(bl1)] # w1 = ww[:,:,self.info.bl_index(bl1)] d2 = dd[:,:,self.info.bl_index(bl2)] # w2 = ww[:,:,self.info.bl_index(bl2)] #delay = red.redundant_bl_cal_simple(d1,w1,d2,w2,self.fqs) delay = red.redundant_bl_cal_simple(d1,d2,self.fqs,window=window,tune=tune) self.blpair2delay[(bl1,bl2)] = delay return self.blpair2delay
def data_to_delays(self, **kwargs): '''data = dictionary of visibilities. info = FirstCalRedundantInfo class can give it kwargs: supports 'window': window function for fourier transform. default is none Returns a dictionary with keys baseline pairs and values delays.''' window = kwargs.get('window', 'none') self.blpair2delay = {} dd = self.info.order_data(self.data) # ww = self.info.order_data(self.wgts) for (bl1, bl2) in self.info.bl_pairs: d1 = dd[:, :, self.info.bl_index(bl1)] # w1 = ww[:,:,self.info.bl_index(bl1)] d2 = dd[:, :, self.info.bl_index(bl2)] # w2 = ww[:,:,self.info.bl_index(bl2)] #delay = red.redundant_bl_cal_simple(d1,w1,d2,w2,self.fqs) delay = red.redundant_bl_cal_simple(d1, d2, self.fqs, window=window) self.blpair2delay[(bl1, bl2)] = delay return self.blpair2delay