Exemple #1
0
    mad_track.input('call, file="errors/HL-LHC/corr_limit.madx";')

# Rematch the orbit at IPs
mad_track.input("call, file='tools/rematchCOIP.madx';")

# Rematch the CO in the arc for dispersion correction
if mad_track.globals.on_disp != 0:
    mad_track.input("call, file='tools/rematchCOarc.madx';")

# Match tunes and chromaticities
pm.match_tune_and_chromaticity(
    mad_track,
    q1=configuration['qx0'],
    q2=configuration['qy0'],
    dq1=configuration['chromaticity_x'],
    dq2=configuration['chromaticity_y'],
    tune_knob1_name=knob_names['qknob_1'][sequence_to_track],
    tune_knob2_name=knob_names['qknob_2'][sequence_to_track],
    chromaticity_knob1_name=knob_names['chromknob_1'][sequence_to_track],
    chromaticity_knob2_name=knob_names['chromknob_2'][sequence_to_track],
    sequence_name=sequence_to_track,
    skip_use=True)

# Check strength limits
if enable_imperfections:
    mad_track.input("call, file='errors/HL-LHC/corr_value_limit.madx';")

# Switch on bb lenses
mad_track.globals.on_bb_charge = 1.

# Switch on RF cavities
mad_track.globals['vrf400'] = configuration['vrf_total']
Exemple #2
0
cta_new = pc.coupling_measurement(mad,
                                  qx_integer=62.,
                                  qy_integer=60.,
                                  qx_fractional=.31,
                                  qy_fractional=.32,
                                  tune_knob1_name='kqtf.b1',
                                  tune_knob2_name='kqtd.b1',
                                  sequence_name='lhcb1',
                                  skip_use=False)

print(f'cmrskew_legacy = {cmrskew_legacy}')
print(f'cmrskew_new = {cmrskew_new}')
print(f'cmiskew_legacy = {cmiskew_legacy}')
print(f'cmiskew_new = {cmiskew_new}')
print(f'cta_legacy = {cta_legacy}')
print(f'cta_new = {cta_new}')

pm.match_tune_and_chromaticity(mad,
                               q1=62.30,
                               q2=60.25,
                               dq1=12.,
                               dq2=14.,
                               tune_knob1_name='kqtf.b1',
                               tune_knob2_name='kqtd.b1',
                               chromaticity_knob1_name='ksf.b1',
                               chromaticity_knob2_name='ksd.b1',
                               sequence_name='lhcb1',
                               skip_use=False)

mad.twiss()