diff --git a/examples/multiline_matching/001_match_lumi_with_target.py b/examples/multiline_matching/001_match_lumi_with_target.py index 7c77c2f..39b94e1 100644 --- a/examples/multiline_matching/001_match_lumi_with_target.py +++ b/examples/multiline_matching/001_match_lumi_with_target.py @@ -62,11 +62,7 @@ } res = collider.match( - # allow_twiss_failure=False, - #verbose=True, - #solver='fsolve', solver_options={'n_bisections': 3, 'min_step': 1e-5, 'n_steps_max': 200}, - ele_start=['e.ds.l8.b1', 's.ds.r8.b2'], ele_stop=['s.ds.r8.b1', 'e.ds.l8.b2'], twiss_init='preserve', @@ -100,7 +96,6 @@ # Leveling with crossing angle and bump rematching collider.match( - # solver='fsolve', solver_options={'n_bisections': 3, 'min_step': 0, 'n_steps_max': 200}, lines=['lhcb1', 'lhcb2'], ele_start=['e.ds.l8.b1', 's.ds.r8.b2'], diff --git a/tests/test_hllhc14.py b/tests/test_hllhc14.py index 6da64e2..f4b1247 100644 --- a/tests/test_hllhc14.py +++ b/tests/test_hllhc14.py @@ -344,8 +344,8 @@ def test_hllhc14_4_bb_config(): assert np.isclose(tw_bb_off.qy, qy_no_bb[line_name], rtol=0, atol=1e-4) # Check that there is a tune shift of the order of 1.5e-2 - assert np.isclose(tw_bb_on.qx, qx_no_bb[line_name] - 1.5e-2, rtol=0, atol=4e-3) - assert np.isclose(tw_bb_on.qy, qy_no_bb[line_name] - 1.5e-2, rtol=0, atol=4e-3) + assert np.isclose(tw_bb_on.qx, qx_no_bb[line_name] - 1.5e-2, rtol=0, atol=5e-3) + assert np.isclose(tw_bb_on.qy, qy_no_bb[line_name] - 1.5e-2, rtol=0, atol=5e-3) # Check that there is no effect on the orbit np.allclose(tw_bb_on.x, tw_bb_off.x, atol=1e-10, rtol=0) @@ -617,7 +617,7 @@ def test_hllhc14_4_bb_config(): check_optics_orbit_etc(collider, line_names=['lhcb1', 'lhcb2'], # From lumi leveling sep_h_ip2=-0.00014330344100935583, # checked against normalized sep - sep_v_ip8=-3.441222062677253e-05, # checked against lumi + sep_v_ip8=-3.43490968732878e-05, # checked against lumi ) def test_stress_co_correction_and_lumi_leveling(): @@ -679,6 +679,9 @@ def test_stress_co_correction_and_lumi_leveling(): # Lumi leveling assuming ideal behavior of the knobs collider.match( + solver_options={ # Standard jacobian settings not sufficient + #(fsolve makes it in less iterations) + 'n_bisections': 3, 'min_step': 0, 'n_steps_max': 200}, ele_start=['e.ds.l8.b1', 's.ds.r8.b2'], ele_stop=['s.ds.r8.b1', 'e.ds.l8.b2'], twiss_init='preserve',