Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
grond
Commits
f7c37727
Commit
f7c37727
authored
Jun 27, 2017
by
Marius Isken
Browse files
Merge branch 'master' of gitext.gfz-potsdam.de:heimann/grond
parents
77cb6e45
3617323d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
src/core.py
View file @
f7c37727
...
...
@@ -730,6 +730,7 @@ def process_event(ievent, g_data_id):
# update_every=10,
# movie_filename='grond_opt_time_magnitude.mp4')
try
:
solver
=
config
.
solver_config
.
get_solver
()
solver
.
solve
(
problem
,
...
...
@@ -741,6 +742,9 @@ def process_event(ievent, g_data_id):
harvest
(
rundir
,
problem
,
force
=
True
)
except
BadProblem
as
e
:
logger
.
error
(
str
(
e
))
tstop
=
time
.
time
()
logger
.
info
(
'stop %i / %i (%g min)'
%
(
ievent
,
nevents
,
(
tstop
-
tstart
)
/
60.
))
...
...
src/
solv
ers/__init__.py
→
src/
optimiz
ers/__init__.py
View file @
f7c37727
File moved
src/
solv
ers/base.py
→
src/
optimiz
ers/base.py
View file @
f7c37727
File moved
src/optimizers/highscore.py
0 → 100644
View file @
f7c37727
This diff is collapsed.
Click to expand it.
src/problems/base.py
View file @
f7c37727
...
...
@@ -205,10 +205,10 @@ class Problem(Object):
return
ws
def
get_bootstrap_weights
(
self
,
ibootstrap
=
None
):
def
get_bootstrap_weights
(
self
,
nbootstrap
,
ibootstrap
=
None
):
if
self
.
_bootstrap_weights
is
None
:
self
.
_bootstrap_weights
=
self
.
make_bootstrap_weights
(
self
.
nbootstrap
,
type
=
'bayesian'
)
nbootstrap
,
type
=
'bayesian'
)
if
ibootstrap
is
None
:
return
self
.
_bootstrap_weights
...
...
@@ -261,7 +261,8 @@ class Problem(Object):
for
p
in
target
.
target_parameters
:
r
=
target
.
target_ranges
[
p
.
name
]
out
.
append
((
r
.
start
,
r
.
stop
))
return
out
return
num
.
array
(
out
,
dtype
=
num
.
float
)
def
get_dependant_bounds
(
self
):
return
[]
...
...
src/problems/cmt.py
View file @
f7c37727
...
...
@@ -18,7 +18,6 @@ class CMTProblemConfig(ProblemConfig):
ranges
=
Dict
.
T
(
String
.
T
(),
gf
.
Range
.
T
())
distance_min
=
Float
.
T
(
default
=
0.0
)
nbootstrap
=
Int
.
T
(
default
=
10
)
mt_type
=
StringChoice
.
T
(
choices
=
[
'full'
,
'deviatoric'
])
def
get_problem
(
self
,
event
,
targets
):
...
...
@@ -39,7 +38,6 @@ class CMTProblemConfig(ProblemConfig):
targets
=
targets
,
ranges
=
self
.
ranges
,
distance_min
=
self
.
distance_min
,
nbootstrap
=
self
.
nbootstrap
,
mt_type
=
self
.
mt_type
,
norm_exponent
=
self
.
norm_exponent
)
...
...
@@ -67,7 +65,6 @@ class CMTProblem(Problem):
Parameter
(
'rel_moment_clvd'
,
label
=
'$M_{0}^{CLVD}/M_{0}$'
)]
distance_min
=
Float
.
T
(
default
=
0.0
)
nbootstrap
=
Int
.
T
(
default
=
10
)
mt_type
=
StringChoice
.
T
(
default
=
'full'
,
choices
=
[
'full'
,
'deviatoric'
,
'dc'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment