Run this analysis
976002
def run_analysis(self, argv):
        """"""
        args = self._parser.parse_args(argv)

        obs = BinnedAnalysis.BinnedObs(irfs=args.irfs,
                                       expCube=args.expcube,
                                       srcMaps=args.srcmaps,
                                       binnedExpMap=args.bexpmap)

        like = BinnedAnalysis.BinnedAnalysis(obs,
                                             optimizer='MINUIT',
                                             srcModel=GtMergeSrcmaps.NULL_MODEL,
                                             wmap=None)

        like.logLike.set_use_single_fixed_map(False)

        print("Reading xml model from %s" % args.srcmdl)
        source_factory = pyLike.SourceFactory(obs.observation)
        source_factory.readXml(args.srcmdl, BinnedAnalysis._funcFactory, False, True, True)
        strv = pyLike.StringVector()
        source_factory.fetchSrcNames(strv)
        source_names = [strv[i] for i in range(strv.size())]

        missing_sources = []
        srcs_to_merge = []
        for source_name in source_names:
            try:
                source = source_factory.releaseSource(source_name)
                # EAC, add the source directly to the model
                like.logLike.addSource(source)
                srcs_to_merge.append(source_name)
            except KeyError:
                missing_sources.append(source_name)

        comp = like.mergeSources(args.merged, source_names, 'ConstantValue')
        like.logLike.getSourceMap(comp.getName())

        print("Merged %i sources into %s" % (len(srcs_to_merge), comp.getName()))
        if missing_sources:
            print("Missed sources: ", missing_sources)

        print("Writing output source map file %s" % args.outfile)
        like.logLike.saveSourceMaps(args.outfile, False, False)
        if args.gzip:
            os.system("gzip -9 %s" % args.outfile)

        print("Writing output xml file %s" % args.outxml)
        like.writeXml(args.outxml)
1048607
def analyze(self, scratch, **kwargs):
        """"""
        errors = Counter()
        for script in self.iter_scripts(scratch):
            prev_name, prev_depth, prev_block = '', 0, script.blocks[0]
            gen = self.iter_blocks(script.blocks)
            for name, depth, block in gen:
                if prev_depth == depth:
                    if prev_name in self.SAY_THINK:
                        if name == 'play sound %s until done':
                            if not self.is_blank(prev_block.args[0]):
                                errors += self.check(gen)
                        # TODO: What about play sound?
                    elif prev_name in self.SAY_THINK_DURATION and \
                            'play sound %s' in name:
                        errors['1'] += 1
                    elif prev_name == 'play sound %s':
                        if name in self.SAY_THINK:
                            errors[self.INCORRECT] += 1
                        elif name in self.SAY_THINK_DURATION:
                            if self.is_blank(block.args[0]):
                                errors[self.ERROR] += 1
                            else:
                                errors[self.HACKISH] += 1
                    elif prev_name == 'play sound %s until done' and \
                            name in self.ALL_SAY_THINK:
                        if not self.is_blank(block.args[0]):
                            errors[self.INCORRECT] += 1
                        # TODO: Should there be an else clause here?
                prev_name, prev_depth, prev_block = name, depth, block
        return {'sound': errors}
367946
def run_analysis(self, argv):
        """"""
        args = self._parser.parse_args(argv)

        if not HAVE_ST:
            raise RuntimeError(
                "Trying to run fermipy analysis, but don't have ST")

        workdir = os.path.dirname(args.config)
        _config_file = self._clone_config_and_srcmaps(args.config, args.seed)

        gta = GTAnalysis(_config_file, logging={'verbosity': 3},
                         fileio={'workdir_regex': '\.xml$|\.npy$'})
        gta.load_roi(args.roi_baseline)

        simfile = os.path.join(workdir, 'sim_%s_%s.yaml' %
                               (args.sim, args.sim_profile))

        mcube_file = "%s_%s_%06i" % (args.sim, args.sim_profile, args.seed)
        sim_config = utils.load_yaml(simfile)

        injected_source = sim_config.get('injected_source', None)
        if injected_source is not None:
            src_dict =  injected_source['source_model']
            src_dict['ra'] = gta.config['selection']['ra']
            src_dict['dec'] = gta.config['selection']['dec']
            injected_name = injected_source['name']
            gta.add_source(injected_name, src_dict)
            gta.write_model_map(mcube_file)
            mc_spec_dict = dict(true_counts=gta.model_counts_spectrum(injected_name),
                                energies=gta.energies,
                                model=src_dict)
            mcspec_file = os.path.join(workdir,
                                       "mcspec_%s_%06i.yaml" % (mcube_file, args.seed))
            utils.write_yaml(mc_spec_dict, mcspec_file)
        else:
            injected_name = None

        gta.write_roi('sim_baseline_%06i' % args.seed)

        test_sources = []
        for profile in args.profiles:
            profile_path = os.path.join(workdir, 'profile_%s.yaml' % profile)
            test_source = load_yaml(profile_path)
            test_sources.append(test_source)
            first = args.seed
            last = first + args.nsims
            for seed in range(first, last):
                self._run_simulation(gta, args.roi_baseline,
                                     injected_name, test_sources, first, seed,
                                     non_null_src=args.non_null_src)
781541
def run(args)
      start_time    = Time.now.to_f
      files         = extract_files(args)
      configuration = load_configuration

      configure(configuration, options)

      runner    = Runner.new(configuration)
      output    = runner.analyze(files)
      exec_time = Time.now.to_f - start_time
      status    = 0

      unless output.empty?
        status = 1
        puts output
      end

      show_benchmark_info(exec_time) if options[:benchmark]

      exit(status)
    end
112024
def analyze(self, args):
        
        self.log.info("Running catalog analysis")

        if args.count:
            self.count()

        return
985751
public void run() {
    // Input step
    Database db = inputStep.getDatabase();
    hier = db.getHierarchy();

    // Algorithms - Data Mining Step
    algorithmStep.runAlgorithms(db);

    // TODO: this could be nicer
    hier.add(db, new SettingsResult(settings));

    // Evaluation
    evaluationStep.runEvaluators(hier, db);

    // Output / Visualization
    outputStep.runResultHandlers(hier, db);
  }
1121227
def run(self, verbose=True):
        
        self.results.clear()

        for analysis_group in self.config.analysis_groups:
            if analysis_group.providers:
                for provider in analysis_group.providers:
                    logger.info('Run provider %s', provider.identifier)
                    provider.run()
                    for checker in analysis_group.checkers:
                        result = self._get_checker_result(
                            analysis_group, checker, provider)
                        self.results.append(result)
                        analysis_group.results.append(result)
                        if verbose:
                            result.print()
            else:
                for checker in analysis_group.checkers:
                    result = self._get_checker_result(
                        analysis_group, checker, nd='no-data-')
                    self.results.append(result)
                    analysis_group.results.append(result)
                    if verbose:
                        result.print()
1045281
def run(self):
        '''
        
        '''
        if self.opts['chunked']:
            ret = self.run_chunked()
        else:
            ret = self.run_oldstyle()

        salt.output.display_output(
                ret,
                self.opts.get('output', 'nested'),
                self.opts)
666408
def runner(self):
        
        printtime('Starting {} analysis pipeline'.format(self.analysistype), self.starttime)
        # Create the objects to be used in the analyses
        objects = Objectprep(self)
        objects.objectprep()
        self.runmetadata = objects.samples
        # Run the analyses
        sippr = Sippr(self, self.cutoff)
        sippr.clear()
        # Print the metadata
        printer = MetadataPrinter(self)
        printer.printmetadata()
63155
def run_analysis( named_analysis, prepared_analyses=None,log_dir=default_log_dir):
    
    if prepared_analyses == None:
        prepared_analyses = prepare_analyses()
    state_collection = funtool.state_collection.StateCollection([],{})
    for analysis in prepared_analyses:
        if analysis.name == named_analysis:
            state_collection= funtool.analysis.run_analysis(analysis, state_collection, log_dir)
    return state_collection
1178800
def run_analysis(self, argv):
        
        args = self._parser.parse_args(argv)
        manifest = yaml.safe_load(open(args.input))

        compname = args.compname
        value = manifest[compname]
        self.assemble_component(compname, value, args.hpx_order)
288020
def run_analysis(self, argv):
        """"""
        args = self._parser.parse_args(argv)

        if not HAVE_ST:
            raise RuntimeError(
                "Trying to run fermipy analysis, but don't have ST")

        gta = GTAnalysis(args.config, logging={'verbosity': 3},
                         fileio={'workdir_regex': '\.xml$|\.npy$'})

        gta.setup(overwrite=False)

        baseline_roi_fit(gta, make_plots=args.make_plots,
                         minmax_npred=[1e3, np.inf])

        localize_sources(gta, nstep=5, dtheta_max=0.5, update=True,
                         prefix='base', make_plots=args.make_plots)

        gta.find_sources(sqrt_ts_threshold=5.0, search_skydir=gta.roi.skydir,
                         search_minmax_radius=[1.0, np.nan])
        gta.optimize()
        gta.print_roi()
        gta.print_params()

        gta.free_sources(skydir=gta.roi.skydir, distance=1.0, pars='norm')
        gta.fit(covar=True)
        gta.print_roi()
        gta.print_params()

        gta.write_roi(args.roi_baseline, make_plots=args.make_plots)
45494
def run_analysis(ast, vm, report)
      classes = configuration.analysis_classes.select do |const|
        const.analyze?(ast, vm)
      end

      classes.each do |const|
        instance = const.new(
          :vm     => vm,
          :report => report,
          :config => configuration
        )

        instance.iterate(ast)
      end
    end
647393
def analyse(self, demand_item, demand_item_code):
        
        my_analysis = Bw2Analysis(self)
        self.result_set = my_analysis.run_analyses(demand_item, demand_item_code, **self.analysis_settings)

        return True
332644
def run(self):
        
        for i in self._stats_stream:
            self._stats = i
            time.sleep(0.1)
            if self.stopped():
                break
1048264
def analyze(self, scratch, **kwargs):
        """"""
        for sprite in self.iter_sprites(scratch):
            for default in self.default_names:
                if default in sprite.name:
                    self.total_default += 1
                    self.list_default.append(sprite.name)
1217147
def gather(self, analysis, node):
        "'"
        assert issubclass(analysis, Analysis)
        a = analysis()
        a.attach(self)
        return a.run(node)