|
278 | 278 | ipol_lin = VLBI.uvtable_values_to(IPol, uvtbl_lin) |
279 | 279 | @test ipol_lin[1].value == 5.0 |
280 | 280 |
|
281 | | - # IPol: error when only 1 parallel hand |
282 | | - @test_throws "expected 2 parallel-hand" VLBI.uvtable_values_to(IPol, uvtbl_err) |
| 281 | + # IPol: from single parallel hand (RR only) |
| 282 | + uvtbl_single_rr = [ |
| 283 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:RR, value=11.0), |
| 284 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:LR, value=12.0), |
| 285 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:RL, value=13.0), |
| 286 | + ] |
| 287 | + ipol_single = VLBI.uvtable_values_to(IPol, uvtbl_single_rr) |
| 288 | + @test length(ipol_single) == 1 |
| 289 | + @test ipol_single[1].value == 11.0 |
| 290 | + @test !haskey(ipol_single[1], :stokes) |
| 291 | + |
| 292 | + # IPol: from single parallel hand (LL only) |
| 293 | + uvtbl_single_ll = [ |
| 294 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:LL, value=7.0), |
| 295 | + ] |
| 296 | + ipol_single_ll = VLBI.uvtable_values_to(IPol, uvtbl_single_ll) |
| 297 | + @test length(ipol_single_ll) == 1 |
| 298 | + @test ipol_single_ll[1].value == 7.0 |
| 299 | + |
| 300 | + # IPol: error when no parallel hands |
| 301 | + uvtbl_no_par = [ |
| 302 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:LR, value=12.0), |
| 303 | + (datetime=1, freq_spec=100.0, spec=1, stokes=:RL, value=13.0), |
| 304 | + ] |
| 305 | + @test_throws "expected 1 or 2 parallel-hand" VLBI.uvtable_values_to(IPol, uvtbl_no_par) |
283 | 306 | end |
284 | 307 |
|
285 | 308 | @testitem "_" begin |
|
0 commit comments