Skip to content

Commit

Permalink
Adding settings for #122
Browse files Browse the repository at this point in the history
  • Loading branch information
alexji committed Aug 13, 2017
1 parent e5ad524 commit 58244c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion smh/default_session.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,5 @@ summary_figure:
- he1523-0901
plot_styles:
spectrum_drawstyle: steps-mid

covariance_draws: 100
error_percentiles: [16, 84]
3 changes: 3 additions & 0 deletions smh/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ def setting(self, key_tree, default_return_value=None):
A tuple containing a tree of dictionary keys.
"""

if isinstance(key_tree, string_types):
key_tree = [key_tree]

value = self.metadata
try:
for key in key_tree:
Expand Down
2 changes: 1 addition & 1 deletion smh/spectral_models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def model_nearby_line(x_, *p):
draws = kwargs.pop("covariance_draws",
self.session.setting("covariance_draws",100))
percentiles = kwargs.pop("percentiles", \
self.session.setting("error_percentiles",(2.5, 97.5)))
self.session.setting("error_percentiles",(16, 84)))
if np.all(np.isfinite(p_cov)):
p_alt = np.random.multivariate_normal(p_opt, p_cov, size=draws)
else:
Expand Down

0 comments on commit 58244c2

Please sign in to comment.