@@ -63,7 +63,7 @@ def make_lhc_beams(madx: Madx, energy: float = 7000, emittance: float = 3.75e-6,
63
63
64
64
>>> make_lhc_beams(madx, energy=6800, emittance=2.5e-6)
65
65
"""
66
- logger .info ("Making default beams for 'lhcb1' and 'lhbc2' sequences" )
66
+ logger .debug ("Making default beams for 'lhcb1' and 'lhbc2' sequences" )
67
67
madx .globals ["NRJ" ] = energy
68
68
madx .globals ["brho" ] = energy * 1e9 / madx .globals .clight
69
69
geometric_emit = madx .globals ["geometric_emit" ] = emittance / (energy / 0.938 )
@@ -104,7 +104,7 @@ def power_landau_octupoles(madx: Madx, beam: int, mo_current: float, defective_a
104
104
logger .exception ("The global MAD-X variable 'NRJ' should have been set in the optics files but is not defined." )
105
105
raise EnvironmentError ("No 'NRJ' variable found in scripts" ) from madx_error
106
106
107
- logger .info (f"Powering Landau Octupoles, beam { beam } @ { madx .globals .nrj } GeV with { mo_current } A." )
107
+ logger .debug (f"Powering Landau Octupoles, beam { beam } @ { madx .globals .nrj } GeV with { mo_current } A." )
108
108
strength = mo_current / madx .globals .Imax_MO * madx .globals .Kmax_MO / brho
109
109
beam = 2 if beam == 4 else beam
110
110
@@ -134,7 +134,7 @@ def deactivate_lhc_arc_sextupoles(madx: Madx, beam: int) -> None:
134
134
# KSF1 and KSD2 - Strong sextupoles of sectors 81/12/45/56
135
135
# KSF2 and KSD1 - Weak sextupoles of sectors 81/12/45/56
136
136
# Rest: Weak sextupoles in sectors 78/23/34/67
137
- logger .info (f"Deactivating all arc sextupoles for beam { beam } ." )
137
+ logger .debug (f"Deactivating all arc sextupoles for beam { beam } ." )
138
138
beam = 2 if beam == 4 else beam
139
139
140
140
for arc in _all_lhc_arcs (beam ):
@@ -165,8 +165,8 @@ def apply_lhc_colinearity_knob(madx: Madx, colinearity_knob_value: float = 0, ir
165
165
166
166
>>> apply_lhc_colinearity_knob(madx, colinearity_knob_value=5, ir=1)
167
167
"""
168
- logger .info (f"Applying Colinearity knob with a unit setting of { colinearity_knob_value } " )
169
- logger .warning ("You should re-match tunes & chromaticities after this" )
168
+ logger .debug (f"Applying Colinearity knob with a unit setting of { colinearity_knob_value } " )
169
+ logger .warning ("You should re-match tunes & chromaticities after this colinearity knob is applied " )
170
170
knob_variables = (f"KQSX3.R{ ir :d} " , f"KQSX3.L{ ir :d} " ) # MQSX IP coupling correctors
171
171
right_knob , left_knob = knob_variables
172
172
@@ -211,8 +211,8 @@ def apply_lhc_rigidity_waist_shift_knob(
211
211
>>> apply_lhc_rigidity_waist_shift_knob(madx, rigidty_waist_shift_value=1.5, ir=5)
212
212
>>> matching.match_tunes_and_chromaticities(madx, "lhc", "lhcb1", 62.31, 60.32)
213
213
"""
214
- logger .info (f"Applying Rigidity Waist Shift knob with a unit setting of { rigidty_waist_shift_value } " )
215
- logger .warning ("You should re-match tunes & chromaticities after this" )
214
+ logger .debug (f"Applying Rigidity Waist Shift knob with a unit setting of { rigidty_waist_shift_value } " )
215
+ logger .warning ("You should re-match tunes & chromaticities after this rigid waist shift knob is applied " )
216
216
right_knob , left_knob = f"kqx.r{ ir :d} " , f"kqx.l{ ir :d} " # IP triplet default knob (no trims)
217
217
218
218
current_right_knob = madx .globals [right_knob ]
@@ -251,8 +251,8 @@ def apply_lhc_coupling_knob(
251
251
252
252
>>> apply_lhc_coupling_knob(madx, coupling_knob=5e-4, beam=1)
253
253
"""
254
- logger .info ("Applying coupling knob" )
255
- logger .warning ("You should re-match tunes & chromaticities after this" )
254
+ logger .debug ("Applying coupling knob" )
255
+ logger .warning ("You should re-match tunes & chromaticities after this coupling knob is applied " )
256
256
suffix = "_sq" if telescopic_squeeze else ""
257
257
knob_name = f"CMRS.b{ beam :d} { suffix } "
258
258
@@ -317,7 +317,7 @@ def install_ac_dipole_as_kicker(
317
317
... )
318
318
"""
319
319
logger .warning ("This AC Dipole is implemented as a kicker and will not affect TWISS functions!" )
320
- logger .info ("This routine should be done after 'match', 'twiss' and 'makethin' for the appropriate beam" )
320
+ logger .debug ("This routine should be done after 'match', 'twiss' and 'makethin' for the appropriate beam" )
321
321
322
322
if top_turns > 6600 :
323
323
logger .warning (
@@ -353,7 +353,7 @@ def install_ac_dipole_as_kicker(
353
353
f"ramp2={ ramp2 } , ramp3={ ramp3 } , ramp4={ ramp4 } ;"
354
354
)
355
355
356
- logger .info (f"Installing AC Dipole kicker with driven tunes of Qx_D = { q1_dipole :.5f} | Qy_D = { q2_dipole :.5f} " )
356
+ logger .debug (f"Installing AC Dipole kicker with driven tunes of Qx_D = { q1_dipole :.5f} | Qy_D = { q2_dipole :.5f} " )
357
357
madx .command .seqedit (sequence = f"lhcb{ beam :d} " )
358
358
madx .command .flatten ()
359
359
# The kicker version is meant for a thin lattice and is installed a right at MKQA.6L4.B[12] (at=0)
@@ -362,7 +362,7 @@ def install_ac_dipole_as_kicker(
362
362
madx .command .endedit ()
363
363
364
364
logger .warning (
365
- f"Sequence LHCB{ beam :d} is now re-used for changes to take effect. Beware that this will reset it, "
365
+ f"Sequence LHCB{ beam :d} is now re-USEd for changes to take effect. Beware that this will reset it, "
366
366
"remove errors etc."
367
367
)
368
368
madx .use (sequence = f"lhcb{ beam :d} " )
@@ -396,7 +396,7 @@ def install_ac_dipole_as_matrix(madx: Madx, deltaqx: float, deltaqy: float, beam
396
396
>>> install_ac_dipole_as_matrix(madx, deltaqx=-0.01, deltaqy=0.012, beam=1)
397
397
"""
398
398
logger .warning ("This AC Dipole is implemented as a matrix and will not affect particle tracking!" )
399
- logger .info ("This routine should be done after 'match', 'twiss' and 'makethin' for the appropriate beam." )
399
+ logger .debug ("This routine should be done after 'match', 'twiss' and 'makethin' for the appropriate beam." )
400
400
401
401
logger .debug ("Retrieving tunes from internal tables" )
402
402
q1 , q2 = madx .table .summ .q1 [0 ], madx .table .summ .q2 [0 ]
@@ -416,7 +416,7 @@ def install_ac_dipole_as_matrix(madx: Madx, deltaqx: float, deltaqy: float, beam
416
416
madx .input (f"hacmap: matrix, l=0, rm21=hacmap21;" )
417
417
madx .input (f"vacmap: matrix, l=0, rm43=vacmap43;" )
418
418
419
- logger .info (f"Installing AC Dipole matrix with driven tunes of Qx_D = { q1_dipole :.5f} | Qy_D = { q2_dipole :.5f} " )
419
+ logger .debug (f"Installing AC Dipole matrix with driven tunes of Qx_D = { q1_dipole :.5f} | Qy_D = { q2_dipole :.5f} " )
420
420
madx .command .seqedit (sequence = f"lhcb{ beam :d} " )
421
421
madx .command .flatten ()
422
422
# The matrix version is meant for a thick lattice and is installed a little after MKQA.6L4.B[12]
@@ -425,7 +425,7 @@ def install_ac_dipole_as_matrix(madx: Madx, deltaqx: float, deltaqy: float, beam
425
425
madx .command .endedit ()
426
426
427
427
logger .warning (
428
- f"Sequence LHCB{ beam :d} is now re-used for changes to take effect. Beware that this will reset it, "
428
+ f"Sequence LHCB{ beam :d} is now re-USEd for changes to take effect. Beware that this will reset it, "
429
429
"remove errors etc."
430
430
)
431
431
madx .use (sequence = f"lhcb{ beam :d} " )
@@ -503,7 +503,7 @@ def reset_lhc_bump_flags(madx: Madx) -> None:
503
503
504
504
>>> reset_lhc_bump_flags(madx)
505
505
"""
506
- logger .info ("Resetting all LHC IP bump flags" )
506
+ logger .debug ("Resetting all LHC IP bump flags" )
507
507
ALL_BUMPS = (
508
508
LHC_ANGLE_FLAGS
509
509
+ LHC_CROSSING_ANGLE_FLAGS
@@ -533,7 +533,7 @@ def make_sixtrack_output(madx: Madx, energy: int) -> None:
533
533
534
534
>>> make_sixtrack_output(madx, energy=6800)
535
535
"""
536
- logger .info ("Preparing outputs for SixTrack" )
536
+ logger .debug ("Preparing outputs for SixTrack" )
537
537
538
538
logger .debug ("Powering RF cavities" )
539
539
madx .globals ["VRF400" ] = 8 if energy < 5000 else 16 # is 6 at injection for protons iirc?
@@ -571,7 +571,7 @@ def make_lhc_thin(madx: Madx, sequence: str, slicefactor: int = 1, **kwargs) ->
571
571
572
572
>>> make_lhc_thin(madx, sequence="lhcb1", slicefactor=4)
573
573
"""
574
- logger .info (f"Slicing sequence '{ sequence } '" )
574
+ logger .debug (f"Slicing sequence '{ sequence } '" )
575
575
madx .select (flag = "makethin" , clear = True )
576
576
four_slices_patterns = [r"mbx\." , r"mbrb\." , r"mbrc\." , r"mbrs\." ]
577
577
four_slicefactor_patterns = [
@@ -675,7 +675,7 @@ def match_no_coupling_through_ripkens(
675
675
location (str): the name of the element at which one wants the cross-term Ripkens to be 0.
676
676
vary_knobs (Sequence[str]): the variables names to ``VARY`` in the ``MAD-X`` routine.
677
677
"""
678
- logger .info (f"Matching Ripken parameters for no coupling at location { location } " )
678
+ logger .debug (f"Matching Ripken parameters for no coupling at location { location } " )
679
679
logger .debug ("Creating macro to update Ripkens" )
680
680
madx .input ("do_ripken: macro = {twiss, ripken=True;}" ) # cpymad needs .input for macros
681
681
0 commit comments