Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Make run_id 0-based
Browse files Browse the repository at this point in the history
  • Loading branch information
jl-wynen committed Nov 1, 2024
1 parent b1a7f9a commit b66acfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sqomega/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _serialize_to_dict(
return {
"filename": ir.String(self.filename),
"filepath": ir.String(self.filepath),
"run_id": ir.F64(float(self.run_id)),
"run_id": ir.F64(float(self.run_id + 1)),
"efix": ir.Array(efix.values, ty=ir.TypeTag.f64),
"emode": ir.F64(float(self.emode.value)),
"en": ir.Array(en, ty=ir.TypeTag.f64),
Expand Down
2 changes: 1 addition & 1 deletion src/sqomega/_sqw.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def g(n: str) -> Any:
return SqwIXExperiment(
filename=g("filename"),
filepath=g("filepath"),
run_id=int(g("run_id")),
run_id=int(g("run_id")) - 1,
efix=efix,
emode=EnergyMode(g("emode")),
en=sc.array(dims=['energy_transfer'], values=en, unit='meV'),
Expand Down

0 comments on commit b66acfb

Please sign in to comment.