of specifycal() executed within gencal(), the values loaded from a csv file
with factors or obtained from the Jy/K Web API are given as the 'parameter'
https://open-jira.nrao.edu/browse/CAS-12236
test_tmp_dir = 'tmp_test_gencal'
ms_key = 'uid___A002_X85c183_X36f.ms'
vis = os.path.join(self.test_tmp_dir, ms_key)
vis = os.path.join(test_tmp_dir, ms_key)
test_data_path = ctsys.resolve('measurementset/almasd')
test_data_path = 'test_data' # should move test data collection
caltable = os.path.join(test_tmp_dir, 'generated_caltable_by_gencal.cal')
self._delete_dir(self.caltable)
self._delete_dir(self.caltable)
if os.path.exists(cls.test_tmp_dir):
shutil.rmtree(cls.test_tmp_dir)
os.mkdir(cls.test_tmp_dir)
original_vis = os.path.join(cls.test_data_path, '.'.join([cls.ms_key, 'sel']))
shutil.copytree(original_vis, cls.vis, symlinks=False)
def test_jyperk_gencal_for_factor_file(self):
"""Test to check that the factors in the csv file are applied to the caltable.
The following arguments are required for this test.
jyperk_factor_csv = self._copy_file('jyperk_factor.csv')
reference_caltable = self._copy_dir('ref_caltable_for_jyperk_with_factor_file.cal')
caltable = '/'.join([self.test_tmp_dir, 'caltable_for_jyperk_with_factor_file.cal'])
self._delete_dir(caltable)
infile=jyperk_factor_csv,
self.assertTrue(os.path.exists(caltable))
self.assertTrue(th.compTables(caltable, reference_caltable, ['WEIGHT']))
self.assertTrue(os.path.exists(self.caltable))
self.assertTrue(th.compTables(self.caltable, reference_caltable, ['WEIGHT']))
return [gencal_antpostest,