Skip to content

Commit

Permalink
defaults: do not re-init always
Browse files Browse the repository at this point in the history
beat: import allow for MixedSourceType result import in geometry mode
  • Loading branch information
hvasbath committed Aug 18, 2024
1 parent 117c716 commit 2f3a47e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions beat/apps/beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,9 @@ def setup(parser):

elif options.mode == geometry_mode_str:
if options.import_from_mode == geometry_mode_str:
# TODO update for n_sources refactoring
n_sources = problem.config.problem_config.n_sources
logger.info("Importing non-linear source geometry results!")

mapping = problem.config.problem_config.get_variables_mapping()
vars2sizes = mapping.unique_variables_sizes()
new_source_params = set(list(c.problem_config.priors.keys()))
old_source_params = set(source_params)

Expand All @@ -747,7 +746,7 @@ def setup(parser):
new_bounds[param] = extract_bounds_from_summary(
summarydf,
varname=param,
shape=(n_sources,),
shape=(vars2sizes[param],),
roundto=0,
alpha=0.06,
)
Expand Down
3 changes: 1 addition & 2 deletions beat/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,5 +320,4 @@ def get_defaults(force=True):
return defaults


defaults = get_defaults()
defaults = get_defaults()
defaults = get_defaults(force=False)

0 comments on commit 2f3a47e

Please sign in to comment.