Ejemplo n.º 1
0
    def get_config(self):
        self.check()

        engine_config = grond.EngineConfig(gf_store_superdirs=['gf_stores'])

        optimiser_config = grond.HighScoreOptimiserConfig()

        return grond.Config(rundir_template=op.join('rundir',
                                                    '${problem_name}.grun'),
                            dataset_config=self.dataset_config,
                            problem_config=self.problem_config,
                            target_groups=self.target_groups,
                            optimiser_config=optimiser_config,
                            engine_config=engine_config)
Ejemplo n.º 2
0
    def get_grond_config(self):
        engine_config = grond.EngineConfig(gf_stores_from_pyrocko_config=False,
                                           gf_store_superdirs=['gf_stores'])

        optimiser_config = grond.HighScoreOptimiserConfig()

        config = grond.Config(
            rundir_template=op.join('runs', '${problem_name}.grun'),
            dataset_config=self.get_dataset_config(),
            target_groups=[
                obs.get_grond_target_group() for obs in self.observations
            ],
            problem_config=self.problem.get_grond_problem_config(),
            optimiser_config=optimiser_config,
            engine_config=engine_config)

        config.set_basepath(self.project_dir)
        return config