Skip to content

Commit c98a15d

Browse files
authored
Knob extractor 2025 (#505)
* added new knobs * version bump * fixed tests
1 parent e5885e8 commit c98a15d

File tree

5 files changed

+41
-10
lines changed

5 files changed

+41
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# OMC3 Changelog
22

3+
#### 2025-04-21 - v0.24.2 - _jdilly_
4+
5+
- Fixed:
6+
- `knob_extractor` added new knobs for 2025.
7+
38
#### 2025-04-04 - v0.24.1 - _jdilly_
49

510
- Added:

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.24.1"
14+
__version__ = "0.24.2"
1515
__author__ = "pylhc"
1616
__author_email__ = "[email protected]"
1717
__license__ = "MIT"

omc3/knob_extractor.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102

103103
LOGGER = get_logger(__name__)
104104

105-
AFS_ACC_MODELS_LHC = Path("/afs/cern.ch/eng/acc-models/lhc/current")
105+
AFS_ACC_MODELS_LHC = Path("/afs/cern.ch/eng/acc-models/lhc/current") # make sure 'current' linked correctly!
106106
ACC_MODELS_LHC = Path("acc-models-lhc")
107107
KNOBS_FILE_ACC_MODELS = ACC_MODELS_LHC / "operation" / "knobs.txt"
108108
KNOBS_FILE_AFS = AFS_ACC_MODELS_LHC / "operation" / "knobs.txt"
@@ -166,10 +166,17 @@ class Head:
166166
],
167167
"disp": [
168168
"LHCBEAM:IP1-SDISP-CORR-SEP",
169-
"LHCBEAM:IP1-SDISP-CORR-XING",
170169
"LHCBEAM:IP5-SDISP-CORR-SEP",
171-
"LHCBEAM:IP5-SDISP-CORR-XING",
172-
# hint: these knobs do not exist for IP2 and IP8
170+
"LHCBEAM:IP1-SDISP-CORR-XING-H",
171+
"LHCBEAM:IP1-SDISP-CORR-XING-V",
172+
"LHCBEAM:IP5-SDISP-CORR-XING-H",
173+
"LHCBEAM:IP5-SDISP-CORR-XING-V",
174+
# "LHCBEAM:IP2-SDISP-CORR-XING-H", # does not exist in knobs.txt
175+
"LHCBEAM:IP2-SDISP-CORR-XING-V",
176+
"LHCBEAM:IP8-SDISP-CORR-XING-H",
177+
"LHCBEAM:IP8-SDISP-CORR-XING-V",
178+
"LHCBEAM1:IP-SDISP-QPBUMP",
179+
"LHCBEAM2:IP-SDISP-QPBUMP",
173180
],
174181
"mo": [
175182
"LHCBEAM1:LANDAU_DAMPING",
@@ -196,6 +203,10 @@ class Head:
196203
"LHCBEAM2:IP8_SEPSCAN_X_MM",
197204
"LHCBEAM2:IP8_SEPSCAN_Y_MM",
198205
],
206+
# "dpp": [ % maybe extract at injection?
207+
# "LHCBEAM1:DP_TRIM_PERMIL",
208+
# "LHCBEAM2:DP_TRIM_PERMIL"
209+
# ],
199210
}
200211

201212
USAGE_EXAMPLES = """Usage Examples:

tests/inputs/knob_extractor/knob_definitions.txt

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ on_sep1_h, LHCBEAM/IP1-SEP-H-MM, 1.0, 2.0
6868
on_sep2h, LHCBEAM/IP2-SEP-H-MM, 1.0, 2.0
6969
on_sep5_v, LHCBEAM/IP5-SEP-V-MM, 1.0, 2.0
7070
on_sep8v, LHCBEAM/IP8-SEP-V-MM, 1.0, 2.0
71-
on_sep1_v, LHCBEAM/IP1-SEP-V-MM, -1.0, 2.0
71+
on_sep1_v, LHCBEAM/IP1-SEP-V-MM, 1.0, 2.0
7272
on_sep2v, LHCBEAM/IP2-SEP-V-MM, 1.0, 2.0
73-
on_sep5_h, LHCBEAM/IP5-SEP-H-MM, -1.0, 2.0
73+
on_sep5_h, LHCBEAM/IP5-SEP-H-MM, 1.0, 2.0
7474
on_sep8h, LHCBEAM/IP8-SEP-H-MM, 1.0, 2.0
7575

7676
# IP Crossing Angles
@@ -85,9 +85,16 @@ on_x8v, LHCBEAM/IP8-XING-V-MURAD, 1.0, 150.0
8585

8686
# ON_DISP KNOBS
8787
on_ssep1_h, LHCBEAM/IP1-SDISP-CORR-SEP, 1.0, 2.0
88-
on_xx1_v, LHCBEAM/IP1-SDISP-CORR-XING, 1.0, 100.0
8988
on_ssep5_v, LHCBEAM/IP5-SDISP-CORR-SEP, 1.0, 2.0
90-
on_xx5_h, LHCBEAM/IP5-SDISP-CORR-XING, 1.0, 100.0
89+
on_xx1_h, LHCBEAM/IP1-SDISP-CORR-XING-H, 1.0, 100.0
90+
on_xx1_v, LHCBEAM/IP1-SDISP-CORR-XING-V, 1.0, 100.0
91+
on_xx2v, LHCBEAM/IP2-SDISP-CORR-XING-V, 1.0, 100.0
92+
on_xx5_h, LHCBEAM/IP5-SDISP-CORR-XING-H, 1.0, 100.0
93+
on_xx5_v, LHCBEAM/IP5-SDISP-CORR-XING-V, 1.0, 100.0
94+
on_xx8h, LHCBEAM/IP8-SDISP-CORR-XING-H, 1.0, 100.0
95+
on_xx8v, LHCBEAM/IP8-SDISP-CORR-XING-V, 1.0, 100.0
96+
on_qpbump.b1, LHCBEAM1/IP-SDISP-QPBUMP, 1.0, 1.0
97+
on_qpbump.b2, LHCBEAM2/IP-SDISP-QPBUMP, 1.0, 1.0
9198

9299
# IP angles (in separation plane)
93100
on_a1, LHCBEAM/IP1-ANGLE-H-MURAD, 1.0, 150.0
@@ -126,3 +133,11 @@ on_yip8b2, LHCBEAM2/IP8_SEPSCAN_Y_MM, 1.0, 1.0
126133
# Landau Octupoles
127134
on_mo.b1, LHCBEAM1/LANDAU_DAMPING, 1.0, 1.0
128135
on_mo.b2, LHCBEAM2/LANDAU_DAMPING, 1.0, 1.0
136+
137+
# Phase Change
138+
phase_change.b1, LHCBEAM1/PHASECHANGE_2023_INJ, 1.0, 1.0
139+
phase_change.b2, LHCBEAM2/PHASECHANGE_2023_INJ, 1.0, 1.0
140+
141+
# dp/p trim
142+
dp_trim.b1, LHCBEAM1/DP_TRIM_PERMIL, 1.0, 1.0
143+
dp_trim.b2, LHCBEAM2/DP_TRIM_PERMIL, 1.0, 1.0

tests/inputs/knob_extractor/state_2022-06-25.tfs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
$ %s %s %s
44
"Optics" "R2022a_A30cmC30cmA10mL200cm" "opticName"
55
"Beam Process" "SQUEEZE-6.8TeV-60cm-30cm_V1_FMD1@337_[END]" "beamProcess"
6-
"Optics ID" "6923.0" "opticId"
6+
"Optics ID" "6923" "opticId"
77
"HyperCycle" "6.8TeV_2022_MD1" "hyperCycle"

0 commit comments

Comments
 (0)