Beispiel #1
0
def test_SS_read():
    obs = '1061313128_99bl_1pol_half_time'
    testfile = os.path.join(DATA_PATH, '%s.uvfits' % obs)
    file_type = 'uvfits'

    ss = SS()

    # Test reading in only metadata skips if block
    ss.read(testfile, read_data=False)
    assert ss.data_array is None, "Data array is not None"

    # Test select on read and diff
    ss.read(testfile, times=np.unique(ss.time_array)[1:10])
    assert ss.Ntimes == 8, "Diff seems like it wasn't executed correctly"

    # See that it still passes UVData check
    assert ss.check()
Beispiel #2
0
def test_SS_read():
    obs = '1061313128_99bl_1pol_half_time'
    testfile = os.path.join(DATA_PATH, '%s.uvfits' % obs)

    ss = SS()

    # Test reading in only metadata skips if block
    ss.read(testfile, read_data=False)
    assert ss.data_array is None, "Data array is not None"

    # Test select on read and diff
    ss.read(testfile, times=np.unique(ss.time_array)[1:10], diff=True)
    assert ss.Ntimes == 8, "Number of times after diff disagrees!"
    assert ss.Nbls == 99, "Number of baselines is incorrect"

    # See that it still passes UVData check
    assert ss.check()