def __init__(self, trange): ''' Create the object for the specified timerange specified by the 2-element Time() trange. The timerange is used to create a list of Miriad database files to read, and the data are read. ''' # Read data out = dump_tsys.rd_miriad_tsys(trange) nt, nf, nant = out['xtsys'].shape self.xdata = out['xtsys'] self.ydata = out['ytsys'] self.fghz = out['fghz'] self.time = Time(out['ut_mjd'], format='mjd') self.tidx = [0, len(self.time)] self.fidx = [116, 448] # Read calibration fghz, self.calfac, self.offsun = offline.read_calfac(trange[0]) self.bidx = [0, 100] self.drange = [None, None] self.antlist = range(nant) self.cbar = True self.showants = range(nant) self.domedian = True self.docal = True self.dolog = False self.dosub = True self.ax = None self.version = __version__
def __init__(self,trange): ''' Create the object for the specified timerange specified by the 2-element Time() trange. The timerange is used to create a list of Miriad database files to read, and the data are read. ''' # Read data out = dump_tsys.rd_miriad_tsys(trange) nt, nf, nant = out['xtsys'].shape self.xdata = out['xtsys'] self.ydata = out['ytsys'] self.fghz = out['fghz'] self.time = Time(out['ut_mjd'],format='mjd') self.tidx = [0,len(self.time)] self.fidx = [116,448] # Read calibration fghz, self.calfac, self.offsun = offline.read_calfac(trange[0]) self.bidx = [0,100] self.drange = [None,None] self.antlist = range(nant) self.cbar = True self.showants = range(nant) self.domedian = True self.docal = True self.dolog = False self.dosub = True self.ax = None self.version = __version__
def __init__(self, trange): ''' Create the object for the specified timerange specified by the 2-element Time() trange. The timerange is used to create a list of Miriad database files to read, and the data are read. ''' # Read data out = dump_tsys.rd_miriad_tsys(trange) nant, npol, nf, nt = out['tsys'].shape self.xdata = out['tsys'][:, 0, :, :] self.ydata = out['tsys'][:, 1, :, :] self.fghz = out['fghz'] self.time = Time(out['ut_mjd'], format='mjd') self.tidx = [0, len(self.time)] # Read calibration fghz, self.calfac, self.offsun = offline.read_calfac(trange[0]) # Make sure frequencies in data and calibration agree calidx, dataidx = common_val_idx((fghz * 1000).astype('int'), (self.fghz * 1000).astype('int')) self.bidx = [0, 100] self.fghz = self.fghz[dataidx] self.xdata = self.xdata[:, dataidx, :] self.ydata = self.ydata[:, dataidx, :] if self.calfac is not None: # Select frequencies and swap axes to put into standard form self.calfac = np.rollaxis(self.calfac[:, calidx, :], 2) self.offsun = np.rollaxis(self.offsun[:, calidx, :], 2) fghz = fghz[calidx] # Set frequency index range (fidx) to default to show only frequencies > 2.5 GHz lowf, = np.where(self.fghz > 2.5) self.fidx = [lowf[0], len(self.fghz)] self.drange = [None, None] self.antlist = range(nant) self.cbar = True self.showants = range(nant) self.domedian = True self.docal = True self.dolog = False self.dosub = True self.ax = None self.version = __version__
def __init__(self,trange): ''' Create the object for the specified timerange specified by the 2-element Time() trange. The timerange is used to create a list of Miriad database files to read, and the data are read. ''' # Read data out = dump_tsys.rd_miriad_tsys(trange) nant, npol, nf, nt = out['tsys'].shape self.xdata = out['tsys'][:,0,:,:] self.ydata = out['tsys'][:,1,:,:] self.fghz = out['fghz'] self.time = Time(out['ut_mjd'],format='mjd') self.tidx = [0,len(self.time)] # Read calibration fghz, self.calfac, self.offsun = offline.read_calfac(trange[0]) # Make sure frequencies in data and calibration agree calidx, dataidx = common_val_idx((fghz*1000).astype('int'),(self.fghz*1000).astype('int')) self.bidx = [0,100] self.fghz = self.fghz[dataidx] self.xdata = self.xdata[:,dataidx,:] self.ydata = self.ydata[:,dataidx,:] if self.calfac is not None: # Select frequencies and swap axes to put into standard form self.calfac = np.rollaxis(self.calfac[:,calidx,:],2) self.offsun = np.rollaxis(self.offsun[:,calidx,:],2) fghz = fghz[calidx] # Set frequency index range (fidx) to default to show only frequencies > 2.5 GHz lowf, = np.where(self.fghz > 2.5) self.fidx = [lowf[0],len(self.fghz)] self.drange = [None,None] self.antlist = range(nant) self.cbar = True self.showants = range(nant) self.domedian = True self.docal = True self.dolog = False self.dosub = True self.ax = None self.version = __version__