Skip to content
GitLab
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
93c3c59c
Commit
93c3c59c
authored
Nov 23, 2017
by
Sebastian Heimann
Browse files
bugfixes
parent
e4da642c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/core.py
View file @
93c3c59c
...
...
@@ -269,6 +269,8 @@ def bootstrap_outliers(problem, misfits, std_factor=1.0):
Identify bootstrap configurations performing bad in global configuration
'''
raise
Exception
(
'this function is broken'
)
gms
=
problem
.
global_misfits
(
misfits
)
ibests
=
[]
...
...
@@ -371,7 +373,7 @@ def harvest(rundir, problem=None, nbest=10, force=False, weed=0):
if
weed
!=
3
:
for
ibootstrap
in
range
(
config
.
solver_config
.
nbootstrap
):
bms
=
problem
.
bootstrap_misfits
(
misfits
,
ibootstrap
,
config
.
solver_config
.
nbootstrap
)
misfits
,
config
.
solver_config
.
nbootstrap
,
ibootstrap
)
isort
=
num
.
argsort
(
bms
)
ibests_list
.
append
(
isort
[:
nbest
])
ibests
.
append
(
isort
[
0
])
...
...
src/plot.py
View file @
93c3c59c
...
...
@@ -200,7 +200,7 @@ def draw_sequence_figures(model, plt, misfit_cutoff=None, sort_by='misfit'):
bounds
=
problem
.
get_parameter_bounds
()
if
ndep
>
0
:
bounds
+
=
problem
.
get_dependant_bounds
()
bounds
=
num
.
concatenate
((
bounds
,
problem
.
get_dependant_bounds
()
))
xref
=
problem
.
get_xref
()
...
...
@@ -361,13 +361,16 @@ def draw_jointpar_figures(
msize
=
1.5
problem
=
model
.
problem
solver
=
model
.
solver
solver
=
model
.
config
.
solver_config
if
not
problem
:
return
[]
xs
=
model
.
xs
bounds
=
problem
.
get_parameter_bounds
()
+
problem
.
get_dependant_bounds
()
bounds
=
num
.
concatenate
((
problem
.
get_parameter_bounds
(),
problem
.
get_dependant_bounds
()))
for
ipar
in
range
(
problem
.
ncombined
):
par
=
problem
.
combined
[
ipar
]
lo
,
hi
=
bounds
[
ipar
]
...
...
@@ -1606,7 +1609,9 @@ def draw_location_figure(model, plt):
axes_dn
=
fig
.
add_subplot
(
2
,
2
,
2
)
axes_ed
=
fig
.
add_subplot
(
2
,
2
,
3
)
bounds
=
problem
.
get_parameter_bounds
()
+
problem
.
get_dependant_bounds
()
bounds
=
num
.
concatenate
((
problem
.
get_parameter_bounds
(),
problem
.
get_dependant_bounds
()))
gms
=
problem
.
global_misfits
(
model
.
misfits
)
...
...
@@ -1876,8 +1881,9 @@ class SolverPlot(object):
self
.
bcolors
=
colors
.
hsv_to_rgb
(
hsv
[
num
.
newaxis
,
:,
:])[
0
,
:,
:]
bounds
=
self
.
problem
.
get_parameter_bounds
()
\
+
self
.
problem
.
get_dependant_bounds
()
bounds
=
num
.
concatenate
((
problem
.
get_parameter_bounds
(),
problem
.
get_dependant_bounds
()))
self
.
xlim
=
fixlim
(
*
xpar
.
scaled
(
bounds
[
ixpar
]))
self
.
ylim
=
fixlim
(
*
ypar
.
scaled
(
bounds
[
iypar
]))
...
...
@@ -1931,8 +1937,9 @@ class SolverPlot(object):
ps
=
core
.
excentricity_compensated_probabilities
(
xhist
[
chains_i
[
j
,
:],
:],
local_sxs
[
jchoice
],
2.
)
bounds
=
self
.
problem
.
get_parameter_bounds
()
+
\
self
.
problem
.
get_dependant_bounds
()
bounds
=
num
.
concatenate
((
self
.
problem
.
get_parameter_bounds
(),
self
.
problem
.
get_dependant_bounds
()))
x
=
num
.
linspace
(
bounds
[
self
.
ixpar
][
0
],
bounds
[
self
.
ixpar
][
1
],
nx
)
...
...
src/problems/base.py
View file @
93c3c59c
...
...
@@ -302,7 +302,7 @@ class Problem(Object):
exp
,
root
=
self
.
get_norm_functions
()
w
=
self
.
get_bootstrap_weights
(
nbootstrap
s
,
ibootstrap
)[
num
.
newaxis
,
:]
*
\
nbootstrap
,
ibootstrap
)[
num
.
newaxis
,
:]
*
\
self
.
get_target_weights
()[
num
.
newaxis
,
:]
*
\
self
.
inter_group_weights2
(
misfits
[:,
:,
1
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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