Commit f7c37727 authored by Marius Isken's avatar Marius Isken
Browse files

Merge branch 'master' of gitext.gfz-potsdam.de:heimann/grond

parents 77cb6e45 3617323d
...@@ -730,16 +730,20 @@ def process_event(ievent, g_data_id): ...@@ -730,16 +730,20 @@ def process_event(ievent, g_data_id):
# update_every=10, # update_every=10,
# movie_filename='grond_opt_time_magnitude.mp4') # movie_filename='grond_opt_time_magnitude.mp4')
solver = config.solver_config.get_solver() try:
solver.solve( solver = config.solver_config.get_solver()
problem, solver.solve(
rundir=rundir, problem,
status=status, rundir=rundir,
# plot=splot, status=status,
xs_inject=xs_inject, # plot=splot,
notifier=notifier) xs_inject=xs_inject,
notifier=notifier)
harvest(rundir, problem, force=True)
harvest(rundir, problem, force=True)
except BadProblem as e:
logger.error(str(e))
tstop = time.time() tstop = time.time()
logger.info( logger.info(
......
This diff is collapsed.
...@@ -205,10 +205,10 @@ class Problem(Object): ...@@ -205,10 +205,10 @@ class Problem(Object):
return ws return ws
def get_bootstrap_weights(self, ibootstrap=None): def get_bootstrap_weights(self, nbootstrap, ibootstrap=None):
if self._bootstrap_weights is None: if self._bootstrap_weights is None:
self._bootstrap_weights = self.make_bootstrap_weights( self._bootstrap_weights = self.make_bootstrap_weights(
self.nbootstrap, type='bayesian') nbootstrap, type='bayesian')
if ibootstrap is None: if ibootstrap is None:
return self._bootstrap_weights return self._bootstrap_weights
...@@ -261,7 +261,8 @@ class Problem(Object): ...@@ -261,7 +261,8 @@ class Problem(Object):
for p in target.target_parameters: for p in target.target_parameters:
r = target.target_ranges[p.name] r = target.target_ranges[p.name]
out.append((r.start, r.stop)) out.append((r.start, r.stop))
return out
return num.array(out, dtype=num.float)
def get_dependant_bounds(self): def get_dependant_bounds(self):
return [] return []
......
...@@ -18,7 +18,6 @@ class CMTProblemConfig(ProblemConfig): ...@@ -18,7 +18,6 @@ class CMTProblemConfig(ProblemConfig):
ranges = Dict.T(String.T(), gf.Range.T()) ranges = Dict.T(String.T(), gf.Range.T())
distance_min = Float.T(default=0.0) distance_min = Float.T(default=0.0)
nbootstrap = Int.T(default=10)
mt_type = StringChoice.T(choices=['full', 'deviatoric']) mt_type = StringChoice.T(choices=['full', 'deviatoric'])
def get_problem(self, event, targets): def get_problem(self, event, targets):
...@@ -39,7 +38,6 @@ class CMTProblemConfig(ProblemConfig): ...@@ -39,7 +38,6 @@ class CMTProblemConfig(ProblemConfig):
targets=targets, targets=targets,
ranges=self.ranges, ranges=self.ranges,
distance_min=self.distance_min, distance_min=self.distance_min,
nbootstrap=self.nbootstrap,
mt_type=self.mt_type, mt_type=self.mt_type,
norm_exponent=self.norm_exponent) norm_exponent=self.norm_exponent)
...@@ -67,7 +65,6 @@ class CMTProblem(Problem): ...@@ -67,7 +65,6 @@ class CMTProblem(Problem):
Parameter('rel_moment_clvd', label='$M_{0}^{CLVD}/M_{0}$')] Parameter('rel_moment_clvd', label='$M_{0}^{CLVD}/M_{0}$')]
distance_min = Float.T(default=0.0) distance_min = Float.T(default=0.0)
nbootstrap = Int.T(default=10)
mt_type = StringChoice.T( mt_type = StringChoice.T(
default='full', choices=['full', 'deviatoric', 'dc']) default='full', choices=['full', 'deviatoric', 'dc'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment