Skip to content

Commit

Permalink
update API to work with emcee global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
noahfranz13 committed Jan 7, 2024
1 parent 74e5cbb commit 933b0b7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions prospect/fitting/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,13 @@ def run_emcee(obs, model, sps, noise, lnprobfn=lnprobfn,
"""
q = model.theta.copy()

postkwargs = {"obs": obs,
"model": model,
"sps": sps,
"noise": noise,
"nested": False,
}
postkwargs = {}
for item in ['obs', 'model', 'sps', 'noise']:
val = eval(item)
if val is not None:
postkwargs[item] = val

postkwargs['nested'] = False

# Could try to make signatures for these two methods the same....
if initial_positions is not None:
Expand Down

0 comments on commit 933b0b7

Please sign in to comment.