Skip to content
Snippets Groups Projects
Commit 2e4d0ac1 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

SSB-47: Rename function to fit purpose

parent f84e0a07
No related branches found
No related tags found
1 merge request!44Merge back holography to master
...@@ -15,25 +15,24 @@ path_to_test_data = '/var/tmp/holography' ...@@ -15,25 +15,24 @@ path_to_test_data = '/var/tmp/holography'
path_to_test_dataset = path_to_test_data + '/CS001HBA0.hdf5' path_to_test_dataset = path_to_test_data + '/CS001HBA0.hdf5'
def _does_test_data_exist(): def _is_test_data_missing():
return not os.path.exists(path_to_test_data) return not os.path.exists(path_to_test_data)
class TestHolographyDatasetClass(unittest.TestCase): class TestHolographyDatasetClass(unittest.TestCase):
@unittest.skipIf(_does_test_data_exist(), 'test data is missing please check documentation') @unittest.skipIf(_is_test_data_missing(), 'test data is missing please check documentation')
def test_create_hds(self): def test_create_hds(self):
''' '''
Reads a Measurement Set from a file and converts it to an HDS. Reads a Measurement Set from a file and converts it to an HDS.
''' '''
# Read the MS into memory. # Read the MS into memory.
holist = list_observations_in_path(path_to_test_data) holist = list_observations_in_path(path_to_test_data)
hbsflist = list_bsf_files_in_path(path_to_test_data) hbsflist = list_bsf_files_in_path(path_to_test_data)
for hbsf in hbsflist: for hbsf in hbsflist:
hbsf.read_file() hbsf.read_file()
ho_per_ms = [(hbsf, ho) for hbsf, ho in zip(hbsflist, holist)] ho_per_ms = [(hbsf, ho) for hbsf, ho in zip(hbsflist, holist)]
# Now create the Holography Data Set in memory from the MS data. # Now create the Holography Data Set in memory from the MS data.
holography_dataset = HolographyDataset() holography_dataset = HolographyDataset()
holography_dataset.load_from_beam_specification_and_ms( holography_dataset.load_from_beam_specification_and_ms(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment