Commits
116 116 | |
117 117 | def test_appendAll(self): |
118 118 | """ Test appending both the GAIN_CURVE and SYSCAL tables """ |
119 119 | appendantab(vis=data_copy, outvis=append_data, antab=evn_antab, overwrite=False, append_tsys=True, append_gc=True) |
120 120 | |
121 121 | tb.open(append_data+"/SYSCAL") |
122 122 | print(tb.getcol("TSYS")) |
123 123 | tb.close() |
124 124 | |
125 125 | # compare to ref syscal and gain_curve table |
126 - | self.assertTrue(th.compTables(append_data + "/SYSCAL", evn_ref + "/SYSCAL", [], mode='absolute', excludecols='')) |
126 + | self.assertTrue(compareTsys(append_data, evn_ref)) |
127 127 | self.assertTrue(compareGains(append_data, evn_ref)) |
128 128 | |
129 129 | def test_appendGainCurve(self): |
130 130 | """ Test appending just the GAIN_CURVE table """ |
131 131 | appendantab(vis=data_copy, outvis=append_data, antab=evn_antab, overwrite=False, append_tsys=False, append_gc=True) |
132 132 | |
133 133 | # make sure SYSCAL wasn't created |
134 134 | self.assertFalse(os.path.exists(append_data + "/SYSCAL")) |
135 135 | self.assertTrue(compareGains(append_data, evn_ref)) |
136 136 | |
137 137 | def test_appendSysCal(self): |
138 138 | """ Test appending just the SYSCAL table """ |
139 139 | appendantab(vis=data_copy, outvis=append_data, antab=evn_antab, overwrite=False, append_tsys=True, append_gc=False) |
140 140 | |
141 141 | # make sure GAIN_CURVE wasn't created |
142 142 | self.assertFalse(os.path.exists(append_data + "/GAIN_CURVE")) |
143 143 | |
144 144 | # compare to ref gain_curve table |
145 - | self.assertTrue(th.compTables(append_data + "/SYSCAL", evn_ref + "/SYSCAL", [], mode='absolute', excludecols='')) |
145 + | self.assertTrue(compareTsys(append_data, evn_ref)) |
146 146 | |
147 147 | def test_appendToExisting(self): |
148 148 | """ Test that the task appends data to an existing ms """ |
149 149 | appendantab(vis=data_copy, outvis=append_data, antab=evn_antab, overwrite=False, append_tsys=True, append_gc=False) |
150 150 | # Get the number of rows added |
151 151 | tb.open(append_data) |
152 152 | first_run = tb.nrows() |
153 153 | tb.close() |
154 154 | |
155 155 | appendantab(vis=append_data, outvis="secondAppend.ms", antab=evn_antab, overwrite=False, append_tsys=True, append_gc=False) |