Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/logbook/LHC/2025_lhc.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The tables below can be sorted by clicking next to the column headers.
| 2025-04-20 16:00 | 2025-04-20 23:00 | 0.2H 0.65HN | Commissioning | NL at injection, IRNL 18cm | [Shift Start](2025-04-20, 1081, 4239958){.logbook-link} / [Summary](2025-04-20, 1081, 4240097){.logbook-link} ([OP](https://be-op-logbook.web.cern.ch/elogbook-server/GET/showEventInLogbook/4240099){.cern_login}) |
| 2025-04-21 17:30 | 2025-04-22 06:00 | 1.6HN | Commissioning | IRNL 1.2m and 18cm | [Shift Start](2025-04-21, 1081, 4240651){.logbook-link} / [Summary](2025-04-22, 1081, 4240898){.logbook-link} ([OP](https://be-op-logbook.web.cern.ch/elogbook-server/GET/showEventInLogbook/4240983){.cern_login}) |
| 2025-04-24 13:00 | 2025-04-25 03:30 | 0.6W 1WN | Commissioning | Global Corrs at 60cm and 18cm and Validation | [Shift Start](2025-04-24, 1081, 4243122){.logbook-link} / [Summary](2025-04-25, 1081, 4243700){.logbook-link} ([OP](https://be-op-logbook.web.cern.ch/elogbook-server/GET/showEventInLogbook/4243717){.cern_login}) |
| 2025-04-27 07:30 | 2025-04-27 23:30 | 1H 1HN | Commissioning | Validation of Everything | [Shift Start](2025-04-27, 1081, 4245465){.logbook-link} / [Summary](2025-04-27, 1081, 4245531){.logbook-link} ([OP](https://be-op-logbook.web.cern.ch/elogbook-server/GET/showEventInLogbook/4245973){.cern_login}) |
<!-- Logbook Links: [LINK_NAME](date, logbook_id, event_id){.logbook-link} -->

<!-- Tooltips -->
Expand All @@ -39,4 +40,5 @@ The tables below can be sorted by clicking next to the column headers.
*[NL at injection, IRNL 18cm]: Chroma scans at injection, reference RDT measurements after 8h at inj and with ecloud tunes, arrived at 18cm but dumped soon.
*[IRNL 1.2m and 18cm]: Validated on/off Momentum at 120cm, and 18cm. Checked sdisp qbump, which did not seem to work. Nonlinear corrections at 18cm: b4, a4 (performed and tested) b3, a3 (only measured/calculated).
*[Global Corrs at 60cm and 18cm and Validation]: Tested SDisp knobs and did a first squeeze down to 18cm with global corrections calculated and incorporated at 60cm and 18cm. Beam dumped twice because of IR5. Validation only up to 4.5TeV but also couldn't kick high.
*[Validation of Everything]: Too many k-mods. Validated 120cm, 93cm, 60cm, 44cm, 30cm, 24cm, 18cm. Waistshift and beta*-beating at 18cm. Tried to find better corrections, but dumped before verifying.
--8<-- "docs/logbook/footer_shifts"
45 changes: 37 additions & 8 deletions scripts/shift_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def plot_all_machines_in_year(
color_map = {name: f"C{ii}" for ii, name in enumerate(["lhc", "sps", "ps", "psb", "leir", "ad", "superkekb"])}

data_map: dict[str, float] = {}
for file_path in logbook_dir.glob(f"{year:4d}_*.md"):
for file_path in logbook_dir.glob(f"**/{year:4d}_*.md"):
machine = file_path.stem.split("_")[1]
if calculate:
shift = calculate_shifts(file_path)
Expand Down Expand Up @@ -395,7 +395,7 @@ def plot_all_machines_in_year(
mpl.rcParams["figure.figsize"] = 7.68, 4.8

repo_dir = Path(__file__).parent.parent
logbook_dir = repo_dir / "docs" / "resources" / "logbook"
logbook_dir = repo_dir / "docs" / "logbook"

# 2022 ---------------------------------------------------------------------

Expand All @@ -404,26 +404,56 @@ def plot_all_machines_in_year(

# 2023 ---------------------------------------------------------------------

# shift_c = calculate_shifts(logbook_dir / "2023_lhc.md")
# shift_c = calculate_shifts(logbook_dir / "LHC" / "2023_lhc.md")
# plot_results(shift_c, title="OMC Shifts LHC 2023 (from Start/End)")

# shift_c = calculate_shifts(logbook_dir / "2023_ps.md")
# plot_results(shift_c, title="OMC Shifts PS 2023 (from Start/End)")

# shift_m = manual_shifts(logbook_dir / "2023_lhc.md")
# plot_results(shift_m, title="OMC Shifts LHC 2023", output_path="lhc_2023_shifts.pdf")
shift_m = manual_shifts(logbook_dir / "LHC" / "2023_lhc.md")
plot_results(shift_m, title="OMC Shifts LHC 2023", output_path="lhc_2023_shifts.pdf")

shift_m = manual_shifts(logbook_dir / "LHC" / "2023_lhc.md", shift_type="Commissioning")
plot_results(shift_m, title="OMC Shifts LHC 2023 (Commissioning)", output_path="lhc_2023_shifts_commish.pdf")

# shift_m = manual_shifts(logbook_dir / "2023_ps.md")
# plot_results(shift_m, title="OMC Shifts PS 2023", output_path="ps_2023_shifts.pdf")

# shift_m = manual_shifts(logbook_dir / "2023_psb.md")
# plot_results(shift_m, title="OMC Shifts PSBooster 2023", output_path="psb_2023_shifts.pdf")

# plot_all_machines_in_year(2023, additional={}, output_path="machines_2023.pdf")

# 2024 ---------------------------------------------------------------------

# shift_m = manual_shifts(logbook_dir / "2024_lhc.md")
# shift_m = manual_shifts(logbook_dir / "LHC" / "2024_lhc.md")
# plot_results(shift_m, title="OMC Shifts LHC 2024", output_path="lhc_2024_shifts.pdf")

# shift_m = manual_shifts(logbook_dir / "LHC" /"2024_lhc.md", shift_type="Commissioning")
# plot_results(shift_m, title="OMC Shifts LHC 2024 (Commissioning)", output_path="lhc_2024_shifts_commish.pdf")

# shift_m = manual_shifts(logbook_dir / "2024_lhc.md", shift_type="MD")
# plot_results(shift_m, title="OMC Shifts LHC 2024 (MDs)", output_path="lhc_2024_shifts_md.pdf")

# shift_m = manual_shifts(logbook_dir / "2024_ps.md")
# plot_results(shift_m, title="OMC Shifts PS 2024", output_path="ps_2024_shifts.pdf")

# shift_m = manual_shifts(logbook_dir / "2024_psb.md")
# plot_results(shift_m, title="OMC Shifts PSBooster 2024", output_path="psb_2024_shifts.pdf")

# shift_m = manual_shifts(logbook_dir / "2024_sps.md")
# plot_results(shift_m, title="OMC Shifts SPS 2024", output_path="sps_2024_shifts.pdf")

# plot_all_machines_in_year(2024, {"leir": 9, "superkekb": 4}, output_path="machines_2024.pdf")

# 2025 ---------------------------------------------------------------------

shift_m = manual_shifts(logbook_dir / "LHC" / "2025_lhc.md")
plot_results(shift_m, title="OMC Shifts LHC 2025", output_path="lhc_2025_shifts.pdf")

# shift_m = calculate_shifts(logbook_dir / "LHC" /"2025_lhc.md")
# plot_results(shift_m, title="OMC Shifts LHC 2025", output_path="lhc_2025_shifts_calc.pdf")

# shift_m = manual_shifts(logbook_dir / "2024_lhc.md", shift_type="Commissioning")
# plot_results(shift_m, title="OMC Shifts LHC 2024 (Commissioning)", output_path="lhc_2024_shifts_commish.pdf")

Expand All @@ -441,8 +471,7 @@ def plot_all_machines_in_year(

# plot_all_machines_in_year(2023, additional={}, output_path="machines_2023.pdf")

plot_all_machines_in_year(2024, {"leir": 9, "superkekb": 4}, output_path="machines_2024.pdf")

# plot_all_machines_in_year(2024, {"leir": 9, "superkekb": 4}, output_path="machines_2024.pdf")

plt.show()