@@ -137,21 +137,21 @@ def test_gather_one_sample(atsim):
137137def test_recalculate_phys_data (atsim , initial_phys_data ):
138138 _check_initial_phys_data (atsim , initial_phys_data )
139139 # Check that errors raised inside thread are converted to warnings.
140- atsim ._at_lat [5 ].PolynomB [0 ] = 1.0e10
140+ atsim ._at_lat [4 ].PolynomB [0 ] = 1.0e10
141141 atsim .queue_set (mock .Mock (), "f" , 0 )
142142 with pytest .warns (at .AtWarning ):
143143 atsim .wait_for_calculations ()
144- atsim ._at_lat [5 ].PolynomB [0 ] = 0.0
144+ atsim ._at_lat [4 ].PolynomB [0 ] = 0.0
145145 # Set corrector x_kick but on a sextupole as no correctors in test ring
146- atsim ._at_lat [21 ].PolynomB [0 ] = - 7.0e-5
146+ atsim ._at_lat [7 ].PolynomB [0 ] = - 7.0e-5
147147 # Set corrector y_kick but on a sextupole as no correctors in test ring
148- atsim ._at_lat [21 ].PolynomA [0 ] = 7.0e-5
148+ atsim ._at_lat [7 ].PolynomA [0 ] = 7.0e-5
149149 # Set quadrupole b1
150- atsim ._at_lat [5 ].PolynomB [1 ] = 2.5
150+ atsim ._at_lat [4 ].PolynomB [1 ] = - 0.8
151151 # Set skew quadrupole a1
152- atsim ._at_lat [7 ].PolynomA [1 ] = 2.25e-3
152+ atsim ._at_lat [10 ].PolynomA [1 ] = 2.25e-3
153153 # Set sextupole b2
154- atsim ._at_lat [21 ].PolynomB [2 ] = - 75
154+ atsim ._at_lat [7 ].PolynomB [2 ] = 10
155155 # Clear the flag and then wait for the calculations
156156 atsim .queue_set (mock .Mock (), "f" , 0 )
157157 atsim .wait_for_calculations ()
@@ -164,8 +164,8 @@ def test_recalculate_phys_data(atsim, initial_phys_data):
164164 numpy .testing .assert_almost_equal (
165165 orbit , [5.18918914e-06 , - 8.92596857e-06 ], decimal = 3
166166 )
167- numpy .testing .assert_almost_equal (chrom , [0.11732846 , 0.04300947 ], decimal = 2 )
168- numpy .testing .assert_almost_equal (tune , [0.37444833 , 0.86048592 ], decimal = 3 )
167+ numpy .testing .assert_almost_equal (chrom , [1.89 , 4.64 ], decimal = 2 )
168+ numpy .testing .assert_almost_equal (tune , [0.133 , 0.307 ], decimal = 3 )
169169 numpy .testing .assert_almost_equal (emit , [1.34308653e-10 , 3.74339964e-13 ], decimal = 3 )
170170
171171
@@ -196,7 +196,8 @@ def test_toggle_calculations_and_wait_for_calculations(atsim, initial_phys_data)
196196 assert not atsim ._paused
197197 # pause > make a change > check no calc > unpause > check calc
198198 atsim .toggle_calculations ()
199- atsim ._at_lat [5 ].PolynomB [1 ] = 2.5
199+ # Kick quadrupole
200+ atsim ._at_lat [4 ].PolynomB [1 ] = - 0.8
200201 atsim .queue_set (mock .Mock (), "f" , 0 )
201202 assert atsim .wait_for_calculations (2 ) is False
202203 _check_initial_phys_data (atsim , initial_phys_data )
@@ -335,7 +336,8 @@ def test_get_radiation_integrals(mocked_atsim):
335336
336337def test_get_momentum_compaction (mocked_atsim , at_lattice ):
337338 numpy .testing .assert_almost_equal (
338- 0.08196721311475409 , mocked_atsim .get_momentum_compaction ()
339+ mocked_atsim .get_momentum_compaction (),
340+ 0.0045641 ,
339341 )
340342
341343
0 commit comments