Skip to content

Commit

Permalink
Merge pull request #253 from OpenCOMPES/fix_save_energy_offset
Browse files Browse the repository at this point in the history
Fix save energy offset
  • Loading branch information
steinnymir authored Nov 9, 2023
2 parents f8a19ca + d48897a commit 22010dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sed/calibrator/energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,13 +1525,13 @@ def add_offsets(
except KeyError as exc:
raise KeyError(f"Missing sign for offset column {k} in config.") from exc
pm = v.get("preserve_mean", False)
if pm == "false":
if str(pm).lower() in ["false", "0", "no"]:
pm = False
elif pm == "true":
elif str(pm).lower() in ["true", "1", "yes"]:
pm = True
preserve_mean.append(pm)
rd = v.get("reduction", None)
if rd == "none":
if str(rd).lower() == "none":
rd = None
reductions.append(rd)

Expand Down

0 comments on commit 22010dd

Please sign in to comment.