Skip to content

Commit a41c888

Browse files
authored
Fix CO units issue in BBsrc converter (#436)
1 parent 26c997b commit a41c888

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

omc3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
__title__ = "omc3"
1212
__description__ = "An accelerator physics tools package for the OMC team at CERN."
1313
__url__ = "https://github.com/pylhc/omc3"
14-
__version__ = "0.13.0"
14+
__version__ = "0.13.1"
1515
__author__ = "pylhc"
1616
__author_email__ = "[email protected]"
1717
__license__ = "MIT"

omc3/scripts/betabeatsrc_output_converter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,9 @@ def convert_old_closed_orbit(
319319

320320
dframe = tfs.read(old_file_path)
321321
dframe = dframe.rename(columns={f"STD{plane}": f"{ERR}{plane}"})
322-
dframe[f"{DELTA}{plane}"] = df_diff(dframe, f"{plane}", f"{plane}{MDL}")
323-
dframe[f"{ERR}{DELTA}{plane}"] = dframe.loc[:, f"{ERR}{plane}"].to_numpy()
322+
# The Closed Orbit is in [mm] in BB.src but in [m] in omc3, so we multiply by 1e-3
323+
dframe[f"{DELTA}{plane}"] = df_diff(dframe, f"{plane}", f"{plane}{MDL}") * 1e-3
324+
dframe[f"{ERR}{DELTA}{plane}"] = dframe.loc[:, f"{ERR}{plane}"].to_numpy() * 1e-3
324325
tfs.write(Path(outputdir) / f"{new_file_name}{plane.lower()}{EXT}", dframe)
325326

326327

0 commit comments

Comments
 (0)