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()
def add_arguments(cls, parser): config = copy.deepcopy(BinSelectTask.get_default_config().values()) config += BinTask.get_class_config().values() config += SelectorTask.get_class_config(group='gtselect').values() pprint.pprint(config) Configurable.add_arguments(parser, config=config)
def add_arguments(cls,parser): config = copy.deepcopy(BinSelectTask.get_default_config().values()) config += BinTask.get_class_config().values() config += SelectorTask.get_class_config(group='gtselect').values() pprint.pprint(config) Configurable.add_arguments(parser,config=config)
def add_arguments(cls, parser): config = TestObject.get_default_config() config.update(BinTask.get_class_config(group='gtbin')) Configurable.add_arguments(parser, config=config)
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()
def add_arguments(cls,parser): config = TestObject.get_default_config() config.update(BinTask.get_class_config(group='gtbin')) Configurable.add_arguments(parser,config=config)
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()