Skip to content

Commit 2ae8acb

Browse files
awegscheJoschD
andauthored
Hl fixes (#428)
* empty list for important phases * printing more decimal spaces for delta_k - printed only 6 before * implement suggestions * .15e formatting --------- Co-authored-by: JoschD <[email protected]>
1 parent c55dd09 commit 2ae8acb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

omc3/correction/response_madx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def _generate_madx_jobs(
9999
break
100100
var = variables[var_idx]
101101
incr_dict[var] = delta_k
102-
current_job += f"{var}={var}{delta_k:+f};\n"
102+
current_job += f"{var} = {var}{delta_k:+.15e};\n"
103103
current_job += f"twiss, file='{str(temp_dir / f'twiss.{var}')}';\n"
104-
current_job += f"{var}={var}{-delta_k:+f};\n\n"
104+
current_job += f"{var} = {var}{-delta_k:+.15e};\n\n"
105105

106106
if proc_idx == num_proc - 1:
107107
current_job += f"twiss, file='{str(temp_dir / 'twiss.0')}';\n"

omc3/model/accelerators/lhc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ def get_exciter_bpm(self, plane: str, commonbpms: List[str]):
339339
return None
340340

341341
def important_phase_advances(self) -> List[List[str]]:
342+
if "hl" in self.year.lower():
343+
# skip if HiLumi, TODO: insert phase advances when they are finalised
344+
return []
345+
342346
if self.beam == 2:
343347
return [["MKD.O5R6.B2", "TCTPH.4R1.B2"], ["MKD.O5R6.B2", "TCTPH.4R5.B2"]]
344348
if self.beam == 1:

0 commit comments

Comments
 (0)