@@ -181,24 +181,24 @@ def test_get_pol_axis(ms_standard_example, ms_rotated_example):
181
181
pol_axis_fixed = get_pol_axis (ms .fixed_ms_path , col = "INSTRUMENT_RECEPTOR_ANGLE" )
182
182
rot_pol_axis_fixed = get_pol_axis (ms .fixed_ms_path , col = "RECEPTOR_ANGLE" )
183
183
184
- assert np .isclose (
185
- pol_axis_original , ms . pol_axis
186
- ), f"Pol axis is incorrect { pol_axis_original = } "
187
- assert np .isclose (
188
- pol_axis_fixed , ms . pol_axis
189
- ), f"Pol axis is incorrect { pol_axis_fixed = } "
190
- assert np .isclose (
191
- rot_pol_axis_fixed , 0 * u . deg
192
- ), f"Pol axis is incorrect { rot_pol_axis_fixed = } "
184
+ assert np .isclose (pol_axis_original , ms . pol_axis ), (
185
+ f"Pol axis is incorrect { pol_axis_original = } "
186
+ )
187
+ assert np .isclose (pol_axis_fixed , ms . pol_axis ), (
188
+ f"Pol axis is incorrect { pol_axis_fixed = } "
189
+ )
190
+ assert np .isclose (rot_pol_axis_fixed , 0 * u . deg ), (
191
+ f"Pol axis is incorrect { rot_pol_axis_fixed = } "
192
+ )
193
193
194
194
195
195
def test_column_exists (ms_standard_example , ms_rotated_example ):
196
196
# Check that CORRECTED_DATA is on disk
197
197
for ms in (ms_standard_example , ms_rotated_example ):
198
198
with table (ms .fixed_ms_path .as_posix ()) as tab :
199
- assert (
200
- ms .corrected_data_column in tab . colnames ()
201
- ), f" { ms . corrected_data_column } not in MS"
199
+ assert ms . corrected_data_column in tab . colnames (), (
200
+ f" { ms .corrected_data_column } not in MS"
201
+ )
202
202
203
203
204
204
def test_original_data (ms_standard_example , ms_rotated_example ):
@@ -290,66 +290,66 @@ def get_wsclean_stokes(ms):
290
290
def test_rotated_data_I (ms_standard_example ):
291
291
mueller_a = askap_stokes (ms_standard_example )
292
292
mueller_a_mat = askap_stokes_mat (ms_standard_example )
293
- assert np .allclose (
294
- mueller_a . stokes_I , mueller_a_mat . stokes_I , atol = 1e-4
295
- ), "Stokes rotation I failed"
293
+ assert np .allclose (mueller_a . stokes_I , mueller_a_mat . stokes_I , atol = 1e-4 ), (
294
+ "Stokes rotation I failed"
295
+ )
296
296
297
297
298
298
def test_rotated_data_Q (ms_standard_example ):
299
299
mueller_a = askap_stokes (ms_standard_example )
300
300
mueller_a_mat = askap_stokes_mat (ms_standard_example )
301
- assert np .allclose (
302
- mueller_a . stokes_Q , mueller_a_mat . stokes_Q , atol = 1e-4
303
- ), f"Stokes rotation Q failed for { ms_standard_example . fixed_ms_path . name } "
301
+ assert np .allclose (mueller_a . stokes_Q , mueller_a_mat . stokes_Q , atol = 1e-4 ), (
302
+ f"Stokes rotation Q failed for { ms_standard_example . fixed_ms_path . name } "
303
+ )
304
304
305
305
306
306
def test_rotated_data_U (ms_standard_example ):
307
307
mueller_a = askap_stokes (ms_standard_example )
308
308
mueller_a_mat = askap_stokes_mat (ms_standard_example )
309
- assert np .allclose (
310
- mueller_a . stokes_U , mueller_a_mat . stokes_U , atol = 1e-4
311
- ), f"Stokes rotation U failed for { ms_standard_example . fixed_ms_path . name } "
309
+ assert np .allclose (mueller_a . stokes_U , mueller_a_mat . stokes_U , atol = 1e-4 ), (
310
+ f"Stokes rotation U failed for { ms_standard_example . fixed_ms_path . name } "
311
+ )
312
312
313
313
314
314
def test_rotated_data_V (ms_standard_example ):
315
315
mueller_a = askap_stokes (ms_standard_example )
316
316
mueller_a_mat = askap_stokes_mat (ms_standard_example )
317
- assert np .allclose (
318
- mueller_a . stokes_V , mueller_a_mat . stokes_V , atol = 1e-4
319
- ), f"Stokes rotation V failed for { ms_standard_example . fixed_ms_path . name } "
317
+ assert np .allclose (mueller_a . stokes_V , mueller_a_mat . stokes_V , atol = 1e-4 ), (
318
+ f"Stokes rotation V failed for { ms_standard_example . fixed_ms_path . name } "
319
+ )
320
320
321
321
322
322
def test_stokes_I (ms_standard_example , ms_rotated_example ):
323
323
for ms in (ms_standard_example , ms_rotated_example ):
324
324
mueller_a = askap_stokes_mat (ms )
325
325
mueller_w = get_wsclean_stokes (ms )
326
- assert np .allclose (
327
- mueller_a . stokes_I , mueller_w . stokes_I , atol = 1e-4
328
- ), f"ASKAP and WSClean disagree on Stokes I in { ms . fixed_ms_path . name } "
326
+ assert np .allclose (mueller_a . stokes_I , mueller_w . stokes_I , atol = 1e-4 ), (
327
+ f"ASKAP and WSClean disagree on Stokes I in { ms . fixed_ms_path . name } "
328
+ )
329
329
330
330
331
331
def test_stokes_Q (ms_standard_example , ms_rotated_example ):
332
332
for ms in (ms_standard_example , ms_rotated_example ):
333
333
mueller_a = askap_stokes_mat (ms )
334
334
mueller_w = get_wsclean_stokes (ms )
335
- assert np .allclose (
336
- mueller_a . stokes_Q , mueller_w . stokes_Q , atol = 1e-1
337
- ), f"ASKAP and WSClean disagree on Stokes Q in { ms . fixed_ms_path . name } "
335
+ assert np .allclose (mueller_a . stokes_Q , mueller_w . stokes_Q , atol = 1e-1 ), (
336
+ f"ASKAP and WSClean disagree on Stokes Q in { ms . fixed_ms_path . name } "
337
+ )
338
338
339
339
340
340
def test_stokes_U (ms_standard_example , ms_rotated_example ):
341
341
for ms in (ms_standard_example , ms_rotated_example ):
342
342
mueller_a = askap_stokes_mat (ms )
343
343
mueller_w = get_wsclean_stokes (ms )
344
- assert np .allclose (
345
- mueller_a . stokes_U , mueller_w . stokes_U , atol = 1e-4
346
- ), f"ASKAP and WSClean disagree on Stokes U in { ms . fixed_ms_path . name } "
344
+ assert np .allclose (mueller_a . stokes_U , mueller_w . stokes_U , atol = 1e-4 ), (
345
+ f"ASKAP and WSClean disagree on Stokes U in { ms . fixed_ms_path . name } "
346
+ )
347
347
348
348
349
349
def test_stokes_V (ms_standard_example , ms_rotated_example ):
350
350
for ms in (ms_standard_example , ms_rotated_example ):
351
351
mueller_a = askap_stokes_mat (ms )
352
352
mueller_w = get_wsclean_stokes (ms )
353
- assert np .allclose (
354
- mueller_a . stokes_V , mueller_w . stokes_V , atol = 1e-4
355
- ), f"ASKAP and WSClean disagree on Stokes V in { ms . fixed_ms_path . name } "
353
+ assert np .allclose (mueller_a . stokes_V , mueller_w . stokes_V , atol = 1e-4 ), (
354
+ f"ASKAP and WSClean disagree on Stokes V in { ms . fixed_ms_path . name } "
355
+ )
0 commit comments