def run_task(self): if self.config['select']: infile = self.prepare_file(self._infile) else: infile = self._infile gtbin = BinTask(infile, self._outfile, config=self.config) print 'gtbin config ' pprint.pprint(gtbin.config) gtbin.run()
def run_task(self): if self.config['select']: infile = self.prepare_file(self._infile) else: infile = self._infile gtbin = BinTask(infile,self._outfile,config=self.config) print 'gtbin config ' pprint.pprint(gtbin.config) gtbin.run()
sys.exit(0) # First run gtselect for f in args.files: # hdulist = pyfits.open(f) #hdulist.info() # ra = 0.0 # dec = 0.0 # Find RA/DEC from FITS file # if args.ra is None or args.dec is None: # m = re.search("CIRCLE\(([0-9\.]+),([0-9\.]+)", # hdulist[1].header['DSVAL2']) # if not m is None: # ra = float(m.group(1)) # dec = float(m.group(2)) # else: # ra = args.ra # dec = args.dec outfile = args.output if outfile is None: outfile = os.path.splitext(os.path.basename(f))[0] + '_binned.fits' gtbin = BinTask(os.path.abspath(f), outfile, opts=args) gtbin.run()
for f in args.files: # hdulist = pyfits.open(f) #hdulist.info() # ra = 0.0 # dec = 0.0 # Find RA/DEC from FITS file # if args.ra is None or args.dec is None: # m = re.search("CIRCLE\(([0-9\.]+),([0-9\.]+)", # hdulist[1].header['DSVAL2']) # if not m is None: # ra = float(m.group(1)) # dec = float(m.group(2)) # else: # ra = args.ra # dec = args.dec outfile = args.output if outfile is None: outfile = os.path.splitext(os.path.basename(f))[0] + '_binned.fits' gtbin = BinTask(os.path.abspath(f),outfile,opts=args) gtbin.run()