Skip to content

Commit

Permalink
Merge pull request #555 from PyFstat/transient-predict-fix
Browse files Browse the repository at this point in the history
get_predict_fstat_parameters_from_dict(): deal with both naming conventions for transient params
  • Loading branch information
dbkeitel authored Jul 2, 2024
2 parents 9a395e6 + c8f638b commit 11eff6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyfstat/utils/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ def get_predict_fstat_parameters_from_dict(signal_parameters, transientWindowTyp
"transient_duration": "transientTau",
}
predict_fstat_params = {key: signal_parameters[key] for key in required_keys}
for key in transient_keys:
for key, val in transient_keys.items():
if key in signal_parameters:
predict_fstat_params[transient_keys[key]] = signal_parameters[key]
predict_fstat_params[val] = signal_parameters[key]
elif val in signal_parameters:
predict_fstat_params[val] = signal_parameters[val]
if transientWindowType is not None:
predict_fstat_params["transientWindowType"] = transientWindowType
return predict_fstat_params

0 comments on commit 11eff6a

Please sign in to comment.