Commits

Ville Suoranta authored bad40506222 Merge
Merge branch 'master' into CAS-13733

casatasks/tests/tasks/test_task_gencal.py

Modified
157 157 evlabslncorrURL = "http://www.vla.nrao.edu/cgi-bin/evlais_blines.cgi?Year="
158 158 try:
159 159 urlaccess = urlopen(evlabslncorrURL+"2019", timeout=60.0)
160 160 gencal(vis=self.msfile2,
161 161 caltable=self.caltable,
162 162 caltype='antpos',
163 163 antenna='')
164 164
165 165 self.assertTrue(os.path.exists(self.caltable))
166 166 # Compare with reference file from the repository
167 + # CAS-13940 - as the correction values are accumulated, running the test at later time
168 + # may cause the values to deviate from the time of reference caltable generation.
169 + # For this specific data set, with antenna 28 on the same pad for a long timespan such
170 + # situation can occur. So here do the comparison of the caltables skipping the correction
167 171 reference = self.reffile3
168 - self.assertTrue(th.compTables(self.caltable, reference, ['WEIGHT', 'OBSERVATION_ID']))
172 + self.assertTrue(th.compTables(self.caltable, reference, ['WEIGHT', 'OBSERVATION_ID', 'FPARAM']))
173 +
174 + # now just compare antennas 23 and 25 entries for FPARAM...
175 + # row 21 (=ant 23) and 23 (= ant 25)
176 + _tb.open(self.caltable)
177 + curfparam=_tb.getcol('FPARAM').transpose()
178 + _tb.close()
179 + _tb.open(reference)
180 + reffparam=_tb.getcol('FPARAM').transpose()
181 + _tb.close()
182 + self.assertTrue((curfparam[21]==reffparam[21]).all())
183 + self.assertTrue((curfparam[23]==reffparam[23]).all())
169 184
170 185 except URLError as err:
171 186 print("Cannot access %s , skip this test" % evlabslncorrURL)
172 187 self.res = True
173 188
174 189
175 190 class test_gencal_antpos_alma(unittest.TestCase):
176 191 """Tests the automatic generation of antenna position corrections for ALMA.
177 192
178 193 New REST web service:

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut