Skip to content

Commit

Permalink
Patch 1.1.1 (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet committed Nov 24, 2022
1 parent 3c70781 commit e538dc0
Show file tree
Hide file tree
Showing 32 changed files with 637 additions and 629 deletions.
6 changes: 3 additions & 3 deletions docker/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ dependencies:
- stack_data=0.2.0
- statsmodels=0.13.2
- sympy=1.9
- tfs-pandas=3.1.0
- tfs-pandas=3.2.1
- threadpoolctl=3.1.0
- tk=8.6.12
- tomli=2.0.1
Expand All @@ -225,6 +225,6 @@ dependencies:
- importlib-resources==5.4.0
- minrpc==0.1.0
- optics-functions==0.1.2
- pyhdtoolkit==1.1.0
- pyhdtoolkit==1.1.1
- pynaff==1.1.4
- scipy==1.9.0
- scipy==1.9.3
8 changes: 8 additions & 0 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Release Notes

The full list of releases can be found in the GitHub repository's `releases page <https://github.com/fsoubelet/PyhDToolkit/releases>`_.

Version 1.1.1
-------------

.. toctree::
:maxdepth: 2

releases/v1.1.1

Version 1.1.0
-------------

Expand Down
16 changes: 16 additions & 0 deletions docs/releases/v1.1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _release_1.1.1:

1.1.1
-----

Release `1.1.1` brings a few fixes and settings changes.

Bug Fixes
~~~~~~~~~

* Various functions in the `~pyhdtoolkit.cpymadtools` submodules do not use the ``CHROM`` flag by default (in ``TWISS`` or matching routines). Providing ``CHROM`` is still possible through ``kwargs``.
* Many calls to `.copy()` following a call to `.dframe()` when querying a ``MAD-X`` table have been removed, as they were redundant.
* A few values in the available plotting settings were changed.


See `v1.1.1 release notes on GitHub <https://github.com/fsoubelet/PyhDToolkit/releases/tag/1.1.1>`_ and the `full changes since v1.0.0 <https://github.com/fsoubelet/PyhDToolkit/compare/1.1.0...1.1.1>`_.
2 changes: 1 addition & 1 deletion examples/demo_aperture.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# We can now determine the exact position of the IP5 point and plot the LHC
# injection aperture:

twiss_df = madx.table.twiss.dframe().copy()
twiss_df = madx.table.twiss.dframe()
ip5s = twiss_df.s[twiss_df.name.str.contains("ip5")].to_numpy()[0]

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_ir_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

madx.command.use(sequence="lhcb1")
matching.match_tunes_and_chromaticities(madx, "lhc", "lhcb1", 62.31, 60.32, 2.0, 2.0)
error_table = madx.table.ir_quads_errors.dframe().copy()
error_table = madx.table.ir_quads_errors.dframe()

###############################################################################
# Let's quickly re-arrange the resulting `~pandas.DataFrame` to align with the
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
# of points of interest through the ``TWISS`` table:

lhc_madx.command.twiss()
twiss_df = lhc_madx.table.twiss.dframe().copy()
twiss_df = lhc_madx.table.twiss.dframe()
twiss_df.name = twiss_df.name.apply(lambda x: x[:-2])
ip1s = twiss_df.s["ip1"]

Expand Down
8 changes: 4 additions & 4 deletions examples/demo_lhc_rigid_waist_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# determine the position of points of interest through the ``TWISS`` table:

madx.command.twiss()
twiss_df = madx.table.twiss.dframe().copy()
twiss_df = madx.table.twiss.dframe()
twiss_df.name = twiss_df.name.apply(lambda x: x[:-2])
ip1s = twiss_df.s["ip1"]

Expand Down Expand Up @@ -104,7 +104,7 @@
# Let's again retrieve the ``TWISS`` table, then plot the new conditions in the
# Interaction Region.

twiss_df_waist = madx.table.twiss.dframe().copy()
twiss_df_waist = madx.table.twiss.dframe()
twiss_df_waist.name = twiss_df.name.apply(lambda x: x[:-2])
ip1s = twiss_df_waist.s["ip1"]

Expand Down Expand Up @@ -186,7 +186,7 @@
lhc.make_lhc_thin(madx, sequence=f"lhcb1", slicefactor=4)
lhc.add_markers_around_lhc_ip(madx, sequence=f"lhcb1", ip=1, n_markers=1000, interval=0.001)
madx.command.twiss()
initial_twiss = madx.table.twiss.dframe().copy()
initial_twiss = madx.table.twiss.dframe()

# Calling pre-calculated and re-matched waist shift knobs
for knobfile in b1_knobs:
Expand All @@ -197,7 +197,7 @@
matching.match_tunes_and_chromaticities(madx, "lhc", f"lhcb1", 62.31, 60.32, 2.0, 2.0)

madx.command.twiss()
twiss_df = madx.table.twiss.dframe().copy()
twiss_df = madx.table.twiss.dframe()

###############################################################################
# We will use all our added markers to determine the location of the waist,
Expand Down
17 changes: 5 additions & 12 deletions pyhdtoolkit/cpymadtools/coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ def get_closest_tune_approach(
This assumes the sequence has previously been matched to the user's desired working point, as if not
explicitely given, the appropriate targets will be determined from the ``MAD-X`` internal tables.
.. important::
This is hard-coded to use the ``CHROM`` flag when performing matching, since we expect to be in
the presence of betatron coupling. In this case, attempting to match chromaticities at the same time as the
tunes might cause ``LMDIF`` to fail, as the knobs become dependent. For this reason, only tune matching is
performed here, and chromaticities are voluntarily ignored.
Args:
madx (cpymad.madx.Madx): an instanciated `~cpymad.madx.Madx` object.
accelerator (Optional[str]): name of the accelerator, used to determmine knobs if *variables* is not given.
Expand Down Expand Up @@ -99,7 +93,7 @@ def get_closest_tune_approach(
tune_knobs, _ = lhc_knobs[:2], lhc_knobs[2:] # first two for tune & last two for chroma, not used

logger.debug("Running TWISS to update SUMM and TWISS tables")
madx.command.twiss(chrom=True)
madx.command.twiss()

logger.debug("Saving knob values to restore after closest tune approach")
varied_knobs = varied_knobs or tune_knobs # if accelerator was given we've extracted this already
Expand Down Expand Up @@ -142,7 +136,7 @@ def get_closest_tune_approach(
logger.debug("Restoring saved knobs")
with madx.batch():
madx.globals.update(saved_knobs)
madx.command.twiss(chrom=True) # make sure TWISS and SUMM tables are returned to their original state
madx.command.twiss() # make sure TWISS and SUMM tables are returned to their original state

return cminus

Expand Down Expand Up @@ -206,7 +200,7 @@ def get_cminus_from_coupling_rdts(
>>> complex_cminus = get_cminus_from_coupling_rdts(madx, patterns=["^BPM.*B[12]$"])
"""
logger.debug(f"Getting coupling RDTs at selected elements thoughout the machine")
twiss_with_rdts = get_pattern_twiss(madx, patterns=patterns, columns=MONITOR_TWISS_COLUMNS, chrom=True)
twiss_with_rdts = get_pattern_twiss(madx, patterns=patterns, columns=MONITOR_TWISS_COLUMNS)
twiss_with_rdts.columns = twiss_with_rdts.columns.str.upper() # optics_functions needs capitalized names
twiss_with_rdts[["F1001", "F1010"]] = coupling_via_cmatrix(twiss_with_rdts, output=["rdts"])

Expand Down Expand Up @@ -263,7 +257,7 @@ def match_no_coupling_through_ripkens(
madx.input("do_ripken: macro = {twiss, ripken=True;}") # cpymad needs .input for macros

logger.debug("Matching Parameters")
madx.command.match(sequence=sequence, use_macro=True, chrom=True)
madx.command.match(sequence=sequence, use_macro=True)
for knob in vary_knobs:
madx.command.vary(name=knob)
madx.command.use_macro(name="do_ripken")
Expand All @@ -283,7 +277,6 @@ def get_coupling_rdts(madx: Madx, **kwargs) -> tfs.TfsDataFrame:
Args:
madx (cpymad.madx.Madx): an instanciated `~cpymad.madx.Madx` object.
**kwargs: any keyword argument will be transmitted to the ``TWISS`` command in ``MAD-X``.
Note that ``CHROM`` is already provided as it is needed for the RDTs' calculation.
Returns:
A `~tfs.TfsDataFrame` with columns of the ``TWISS`` table, and two complex columns for the
Expand All @@ -294,7 +287,7 @@ def get_coupling_rdts(madx: Madx, **kwargs) -> tfs.TfsDataFrame:
>>> twiss_rdts = get_coupling_rdts(madx)
"""
twiss_tfs = get_twiss_tfs(madx, chrom=True, **kwargs)
twiss_tfs = get_twiss_tfs(madx, **kwargs)
twiss_tfs[["F1001", "F1010"]] = coupling_via_cmatrix(twiss_tfs, output=["rdts"])
return twiss_tfs

Expand Down
6 changes: 2 additions & 4 deletions pyhdtoolkit/cpymadtools/lhc/_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def correct_lhc_global_coupling(

real_knob, imag_knob = f"CMRS.b{beam:d}{suffix}", f"CMIS.b{beam:d}{suffix}"
logger.debug(f"Matching using the coupling knobs '{real_knob}' and '{imag_knob}'")
madx.command.match(chrom=True, sequence=sequence)
madx.command.match(sequence=sequence)
madx.command.gweight(dqmin=1, Q1=0)
madx.command.global_(dqmin=0, Q1=62.28)
madx.command.vary(name=real_knob, step=1.0e-8)
Expand Down Expand Up @@ -77,9 +77,7 @@ def get_lhc_bpms_twiss_and_rdts(madx: Madx) -> tfs.TfsDataFrame:
>>> twiss_with_rdts = get_lhc_bpms_twiss_and_rdts(madx)
"""
twiss_tfs = twiss.get_pattern_twiss( # need chromatic flag as we're dealing with coupling
madx, patterns=["^BPM.*B[12]$"], columns=MONITOR_TWISS_COLUMNS, chrom=True
)
twiss_tfs = twiss.get_pattern_twiss(madx, patterns=["^BPM.*B[12]$"], columns=MONITOR_TWISS_COLUMNS)
twiss_tfs.columns = twiss_tfs.columns.str.upper() # optics_functions needs capitalized names
twiss_tfs.NAME = twiss_tfs.NAME.str.upper()
twiss_tfs[["F1001", "F1010"]] = coupling_via_cmatrix(twiss_tfs, output=["rdts"])
Expand Down
2 changes: 1 addition & 1 deletion pyhdtoolkit/cpymadtools/lhc/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ def get_sizes_at_ip(madx: Madx, ip: int, geom_emit_x: float = None, geom_emit_y:
geom_emit_x = geom_emit_x or madx.globals["geometric_emit_x"]
geom_emit_y = geom_emit_y or madx.globals["geometric_emit_y"]

twiss_tfs = twiss.get_twiss_tfs(madx, chrom=True, ripken=True)
twiss_tfs = twiss.get_twiss_tfs(madx, ripken=True)
twiss_tfs = _add_beam_size_to_df(twiss_tfs, geom_emit_x, geom_emit_y)
return twiss_tfs.loc[f"IP{ip:d}"].SIZE_X, twiss_tfs.loc[f"IP{ip:d}"].SIZE_Y
4 changes: 2 additions & 2 deletions pyhdtoolkit/cpymadtools/lhc/_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def correct_lhc_global_coupling(

real_knob, imag_knob = f"CMRS.b{beam:d}{suffix}", f"CMIS.b{beam:d}{suffix}"
logger.debug(f"Matching using the coupling knobs '{real_knob}' and '{imag_knob}'")
madx.command.match(chrom=True, sequence=sequence)
madx.command.match(sequence=sequence)
madx.command.gweight(dqmin=1, Q1=0)
madx.command.global_(dqmin=0, Q1=62.28)
madx.command.vary(name=real_knob, step=1.0e-8)
Expand Down Expand Up @@ -181,6 +181,6 @@ def correct_lhc_orbit(

for _ in range(iterations):
logger.trace("Doing orbit correction for Y then X plane")
madx.twiss(chrom=True)
madx.command.twiss()
madx.command.correct(sequence=sequence, plane="y", flag="ring", error=orbit_tolerance, mode=mode, **kwargs)
madx.command.correct(sequence=sequence, plane="x", flag="ring", error=orbit_tolerance, mode=mode, **kwargs)
13 changes: 2 additions & 11 deletions pyhdtoolkit/cpymadtools/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ def match_tunes_and_chromaticities(
If explicit knobs are provided, these will always be used. On other machines the knobs should be provided
explicitly, always.
.. important::
The matching is always performed with the ``CHROM`` option on.
Args:
madx (cpymad.madx.Madx): an instanciated `~cpymad.madx.Madx` object.
accelerator (Optional[str]): name of the accelerator, used to determmine knobs if *variables* is not given.
Expand Down Expand Up @@ -129,7 +126,7 @@ def match_tunes_and_chromaticities(
def match(*args, **kwargs):
"""Create matching commands for kwarg targets, varying the given args."""
logger.debug(f"Executing matching commands, using sequence '{sequence}'")
madx.command.match(chrom=True)
madx.command.match()
logger.trace(f"Targets are given as {kwargs}")
madx.command.global_(sequence=sequence, **kwargs)
for variable_name in args:
Expand All @@ -138,7 +135,7 @@ def match(*args, **kwargs):
madx.command.lmdif(calls=calls, tolerance=tolerance)
madx.command.endmatch()
logger.trace("Performing routine TWISS")
madx.twiss(chrom=True) # prevents errors if the user forgets to TWISS before querying tables
madx.command.twiss() # prevents errors if the user forgets to TWISS before querying tables

# Case of a combined matching: both tune and chroma targets have been provided
if q1_target is not None and q2_target is not None and dq1_target is not None and dq2_target is not None:
Expand Down Expand Up @@ -191,9 +188,6 @@ def match_tunes(
This is a wrapper around the `~.match_tunes_and_chromaticities` function. Refer to its documentation
for usage details.
.. important::
The matching is always performed with the ``CHROM`` option on.
Args:
madx (cpymad.madx.Madx): an instanciated `~cpymad.madx.Madx` object.
accelerator (Optional[str]): name of the accelerator, used to determmine knobs if *variables* is not given.
Expand Down Expand Up @@ -275,9 +269,6 @@ def match_chromaticities(
This is a wrapper around the `~.match_tunes_and_chromaticities` function. Refer to its documentation
for usage details.
.. important::
The matching is always performed with the ``CHROM`` option on.
Args:
madx (cpymad.madx.Madx): an instanciated `~cpymad.madx.Madx` object.
accelerator (Optional[str]): name of the accelerator, used to determmine knobs if *variables* is not given.
Expand Down
4 changes: 2 additions & 2 deletions pyhdtoolkit/cpymadtools/ptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ def ptc_track_particle(

if onetable: # user asked for ONETABLE, there will only be one table 'trackone' given back by MAD-X
logger.debug("Because of option ONETABLE only one table 'TRACKONE' exists to be returned.")
return {"trackone": madx.table.trackone.dframe().copy()}
return {"trackone": madx.table.trackone.dframe()}
return {
f"observation_point_{point:d}": madx.table[f"track.obs{point:04d}.p0001"].dframe().copy()
f"observation_point_{point:d}": madx.table[f"track.obs{point:04d}.p0001"].dframe()
for point in range(1, len(observation_points) + 2) # len(observation_points) + 1 for start of
# machine + 1 because MAD-X starts indexing these at 1
}
4 changes: 2 additions & 2 deletions pyhdtoolkit/cpymadtools/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def track_single_particle(
madx.command.endtrack()
if onetable: # user asked for ONETABLE, there will only be one table 'trackone' given back by MAD-X
logger.debug("Because of option ONETABLE only one table 'TRACKONE' exists to be returned.")
return {"trackone": madx.table.trackone.dframe().copy()}
return {"trackone": madx.table.trackone.dframe()}
return {
f"observation_point_{point:d}": madx.table[f"track.obs{point:04d}.p0001"].dframe().copy()
f"observation_point_{point:d}": madx.table[f"track.obs{point:04d}.p0001"].dframe()
for point in range(1, len(observation_points) + 2) # len(observation_points) + 1 for start of
# machine + 1 because MAD-X starts indexing these at 1
}
2 changes: 1 addition & 1 deletion pyhdtoolkit/cpymadtools/twiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_pattern_twiss(
madx.twiss(**kwargs)

logger.trace("Extracting relevant parts of the TWISS table")
twiss_df = tfs.TfsDataFrame(madx.table.twiss.dframe().copy())
twiss_df = tfs.TfsDataFrame(madx.table.twiss.dframe())
twiss_df.headers = {var.upper(): madx.table.summ[var][0] for var in madx.table.summ}
twiss_df = twiss_df[madx.table.twiss.selected_columns()].iloc[madx.table.twiss.selected_rows()]

Expand Down
2 changes: 1 addition & 1 deletion pyhdtoolkit/optics/ripken.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def lebedev_beam_size(
>>> geom_emit_x = madx.globals["geometric_emit_x"]
>>> geom_emit_y = madx.globals["geometric_emit_y"]
>>> twiss_tfs = madx.twiss(ripken=True).dframe().copy()
>>> twiss_tfs = madx.twiss(ripken=True).dframe()
>>> horizontal_size = lebedev_beam_size(
twiss_tfs.beta11, twiss_tfs.beta21, geom_emit_x, geom_emit_y
)
Expand Down
2 changes: 1 addition & 1 deletion pyhdtoolkit/plotting/aperture.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def plot_aperture(
logger.debug("Plotting aperture limits and machine layout")
logger.debug("Getting Twiss dataframe from cpymad")
madx.command.twiss(centre=True)
twiss_df: pd.DataFrame = madx.table.twiss.dframe().copy()
twiss_df: pd.DataFrame = madx.table.twiss.dframe()
aperture_df = pd.DataFrame.from_dict(dict(madx.table.aperture)) # slicing -> issues with .dframe()

# Restrict the span of twiss_df to avoid plotting all elements then cropping when xlimits is given
Expand Down
4 changes: 2 additions & 2 deletions pyhdtoolkit/plotting/crossing.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def plot_two_lhc_ips_crossings(
logger.debug("Getting TWISS table for LHCB1")
madx.use(sequence="lhcb1")
madx.command.twiss(centre=True)
twiss_df_b1 = madx.table.twiss.dframe().copy()
twiss_df_b1 = madx.table.twiss.dframe()

logger.debug("Getting TWISS table for LHCB2")
madx.use(sequence="lhcb2")
madx.command.twiss(centre=True)
twiss_df_b2 = madx.table.twiss.dframe().copy()
twiss_df_b2 = madx.table.twiss.dframe()

logger.trace("Determining exact locations of IP points")
first_ip_s = twiss_df_b1.s[f"ip{first_ip}"]
Expand Down
6 changes: 3 additions & 3 deletions pyhdtoolkit/plotting/envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def _interpolate_madx(madx: Madx) -> None:
def _get_twiss_hr_from_madx(madx: Madx, beam_params: BeamParameters) -> pd.DataFrame:
"""Get twiss hr from the provided MAD-X instance."""
logger.trace("Getting Twiss dframe from MAD-X")
twiss_hr: pd.DataFrame = madx.table.twiss.dframe().copy()
twiss_hr: pd.DataFrame = madx.table.twiss.dframe()
twiss_hr["betatronic_envelope_x"] = np.sqrt(twiss_hr.betx * beam_params.eg_x_m)
twiss_hr["betatronic_envelope_y"] = np.sqrt(twiss_hr.bety * beam_params.eg_y_m)
twiss_hr["dispersive_envelope_x"] = twiss_hr.dx * beam_params.deltap_p
twiss_hr["dispersive_envelope_y"] = twiss_hr.dy * beam_params.deltap_p
twiss_hr["envelope_x"] = np.sqrt(twiss_hr.betatronic_envelope_x**2 + (twiss_hr.dx * beam_params.deltap_p) ** 2)
twiss_hr["envelope_y"] = np.sqrt(twiss_hr.betatronic_envelope_y**2 + (twiss_hr.dy * beam_params.deltap_p) ** 2)
twiss_hr["envelope_x"] = np.sqrt(twiss_hr.betatronic_envelope_x ** 2 + (twiss_hr.dx * beam_params.deltap_p) ** 2)
twiss_hr["envelope_y"] = np.sqrt(twiss_hr.betatronic_envelope_y ** 2 + (twiss_hr.dy * beam_params.deltap_p) ** 2)
return twiss_hr
4 changes: 2 additions & 2 deletions pyhdtoolkit/plotting/styles/paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SINGLE_COLUMN: Dict[str, PlotSetting] = {
# ------ Lines ------ #
"lines.linewidth": 1.3, # Width of plot lines
"lines.markersize": 2, # Marker size, in points
"lines.markersize": 5, # Marker size, in points
# ------ Patches ------ #
"patch.linewidth": 1.2, # Width of patches edge lines
# ------ Fonts ------ #
Expand Down Expand Up @@ -54,7 +54,7 @@
"legend.frameon": True, # Make a dedicated patch for the legend
"legend.framealpha": 0.85, # Legend patch transparency factor
"legend.fancybox": True, # Use rounded box for legend background
"legend.fontsize": 24, # Legend text font size
"legend.fontsize": 20, # Legend text font size
# ------ Figure ------ #
"figure.figsize": (11, 7), # Size of the figure
"figure.titlesize": 20, # Size of the figure title
Expand Down
4 changes: 2 additions & 2 deletions pyhdtoolkit/plotting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def make_survey_groups(madx: Madx) -> Dict[str, pd.DataFrame]:
logger.debug("Getting different element groups dframes from MAD-X survey")
madx.command.survey()

survey_df = madx.table.survey.dframe().copy()
survey_df = madx.table.survey.dframe()
return {
"dipoles": survey_df[survey_df.index.isin(element_dfs["dipoles"].index.tolist())],
"quad_foc": survey_df[survey_df.index.isin(quadrupoles_focusing_df.index.tolist())],
Expand Down Expand Up @@ -356,7 +356,7 @@ def _get_twiss_table_with_offsets_and_limits(
# Restrict the span of twiss_df to avoid plotting all elements then cropping when xlimits is given
logger.trace("Getting TWISS table from MAD-X")
madx.command.twiss()
twiss_df = madx.table.twiss.dframe().copy()
twiss_df = madx.table.twiss.dframe()
twiss_df.s = twiss_df.s - xoffset
twiss_df = twiss_df[twiss_df.s.between(*xlimits)] if xlimits else twiss_df
return twiss_df
Expand Down
2 changes: 1 addition & 1 deletion pyhdtoolkit/utils/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def apply_colin_corrs_balance(madx: Madx) -> None:
lhc.misalign_lhc_ir_quadrupoles(madx, ips=[8], beam=1, quadrupoles=[3], sides="R", DPSI=1e-3)
madx.globals["kqsx3.l8"] = -5e-4
madx.globals["kqsx3.r8"] = -5e-4
madx.command.twiss(chrom=True)
madx.command.twiss()


# ----- Fetching Utilities ----- #
Expand Down
Loading

0 comments on commit e538dc0

Please sign in to comment.