def save(self): if self.doapply: if not self.insitu: self.manager.split(self.outfile) elif self.dosky: outfile = sdutil.get_default_outfile_name(self.infile, self.outfile, '_sky') self.manager.save_caltable(outfile) elif self.dotsys: outfile = sdutil.get_default_outfile_name(self.infile, self.outfile, '_tsys') self.manager.save_caltable(outfile)
def __compile(self): # infiles if isinstance(self.infiles, str): self.infiles = [self.infiles] # scantable for temporary use tmpst = sd.scantable(self.infiles[0], False) # scanlist #self.scans = sdutil._to_list(self.scanlist, int) self.scans = tmpst.parse_idx_selection("SCAN", self.scanno) # pollist #self.pols = sdutil._to_list(self.pollist, int) self.pols = tmpst.parse_idx_selection("POL", self.polno) # spw if (self.spw.strip() == '-1'): self.ifno = tmpst.getif(0) else: masklist = tmpst.parse_spw_selection(self.spw) if len(masklist) == 0: raise ValueError, "Invalid spectral window selection. Selection contains no data." self.ifno = masklist.keys()[0] # outfile self.outname = sdutil.get_default_outfile_name(self.infiles[0], self.outfile, self.suffix) sdutil.assert_outfile_canoverwrite_or_nonexistent(self.outname, 'ASAP', self.overwrite) # nx and ny (self.nx, self.ny) = sdutil.get_nx_ny(self.npix) # cellx and celly (self.cellx, self.celly) = sdutil.get_cellx_celly(self.cell) # map center self.mapcenter = sdutil.get_map_center(self.center) del tmpst
def __compile(self): # infiles if isinstance(self.infiles, str): self.infiles = [self.infiles] # scantable for temporary use tmpst = sd.scantable(self.infiles[0], False) # scanlist #self.scans = sdutil._to_list(self.scanlist, int) self.scans = tmpst.parse_idx_selection("SCAN", self.scanno) # pollist #self.pols = sdutil._to_list(self.pollist, int) self.pols = tmpst.parse_idx_selection("POL", self.polno) # spw if (self.spw.strip() == '-1'): self.ifno = tmpst.getif(0) else: masklist = tmpst.parse_spw_selection(self.spw) if len(masklist) == 0: raise ValueError, "Invalid spectral window selection. Selection contains no data." self.ifno = masklist.keys()[0] # outfile self.outname = sdutil.get_default_outfile_name(self.infiles[0], self.outfile, self.suffix) sdutil.assert_outfile_canoverwrite_or_nonexistent( self.outname, 'ASAP', self.overwrite) # nx and ny (self.nx, self.ny) = sdutil.get_nx_ny(self.npix) # cellx and celly (self.cellx, self.celly) = sdutil.get_cellx_celly(self.cell) # map center self.mapcenter = sdutil.get_map_center(self.center) del tmpst