Skip to content

Commit

Permalink
Add testing for miriad phase type with all but one time flagged
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Apr 4, 2018
1 parent 0a3c2bd commit fdb22aa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pyuvdata/tests/test_miriad.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,24 @@ def test_singletimeselect_drift():
uv_out.read_miriad(testfile, phase_type='drift')
nt.assert_equal(uv_in, uv_out)

# check again with more than one time but only 1 unflagged time
uvtest.checkWarnings(uv_in.read_miriad, [miriad_file],
known_warning='miriad')
time_gt0_array = np.where(uv_in.time_array > uv_in.time_array[0])[0]
uv_in.flag_array[time_gt0_array, :, :, :] = True

# get unflagged blts
blt_good = np.where(~np.all(uv_in.flag_array, axis=(1, 2, 3)))
nt.assert_true(np.isclose(np.mean(np.diff(uv_in.time_array[blt_good])), 0.))

uv_in.write_miriad(testfile, clobber=True)
uv_out.read_miriad(testfile)
nt.assert_equal(uv_in, uv_out)

# check that setting the phase_type works
uv_out.read_miriad(testfile, phase_type='drift')
nt.assert_equal(uv_in, uv_out)


def test_poltoind():
miriad_uv = UVData()
Expand Down

0 comments on commit fdb22aa

Please sign in to comment.