Skip to content

Commit

Permalink
Fix CO units issue in BBsrc converter (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet authored Feb 23, 2024
1 parent 26c997b commit a41c888
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion omc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__title__ = "omc3"
__description__ = "An accelerator physics tools package for the OMC team at CERN."
__url__ = "https://github.com/pylhc/omc3"
__version__ = "0.13.0"
__version__ = "0.13.1"
__author__ = "pylhc"
__author_email__ = "pylhc@github.com"
__license__ = "MIT"
Expand Down
5 changes: 3 additions & 2 deletions omc3/scripts/betabeatsrc_output_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@ def convert_old_closed_orbit(

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


Expand Down

0 comments on commit a41c888

Please sign in to comment.