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

SSB-47: implementing selection of the beam specification file path

parent 188cc55c
No related branches found
No related tags found
1 merge request!44Merge back holography to master
...@@ -182,16 +182,19 @@ def read_holography_datasets_and_store(holography_observation_path, ...@@ -182,16 +182,19 @@ def read_holography_datasets_and_store(holography_observation_path,
if holography_ms_path is not None: if holography_ms_path is not None:
raise NotImplementedError() raise NotImplementedError()
if holography_bsf_path is not None: if holography_bsf_path is not None:
raise NotImplementedError() if not os.path.exists(holography_bsf_path):
raise FileNotFoundError(holography_bsf_path)
else:
holography_bsf_path = holography_observation_path
if calibration_tables_path is None: if calibration_tables_path is None:
calibration_tables_path = holography_observation_path calibration_tables_path = holography_observation_path
target_station_names = list_all_target_stations(holography_observation_path) target_station_names = list_all_target_stations(holography_bsf_path)
logger.debug('target station names %s', target_station_names) logger.debug('target station names %s', target_station_names)
matched_bsf_ms_pair =\ matched_bsf_ms_pair =\
match_holography_beam_specification_file_with_observation(holography_observation_path) match_holography_beam_specification_file_with_observation(holography_bsf_path, holography_observation_path)
logger.debug('matched beam specification files and measurement sets: %s', logger.debug('matched beam specification files and measurement sets: %s',
matched_bsf_ms_pair) matched_bsf_ms_pair)
......
...@@ -24,9 +24,9 @@ def is_observation_in_range(start, end, from_datetime, to_datetime): ...@@ -24,9 +24,9 @@ def is_observation_in_range(start, end, from_datetime, to_datetime):
return start_in_range and end_in_range return start_in_range and end_in_range
def match_holography_beam_specification_file_with_observation(path): def match_holography_beam_specification_file_with_observation(bsf_path, observation_path):
bsf_files = list_bsf_files_in_path(path) bsf_files = list_bsf_files_in_path(bsf_path)
observation_list = list_observations_in_path(path) observation_list = list_observations_in_path(observation_path)
logger.debug('specification files found %s', bsf_files) logger.debug('specification files found %s', bsf_files)
logger.debug('observation files found %s', observation_list) logger.debug('observation files found %s', observation_list)
matched_observation_bsf_pair = [] matched_observation_bsf_pair = []
......
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