Commits

C. Enrique Garcia Dabo authored 178c3684549
Add test cases for expected failures in gencal

Fixes partially CAS-14253

casatasks/src/private/correct_ant_posns.py

Modified
103 103 differential_pos = []
104 104 for corrected_antenna_name, corrected_abspos in corrected_antenna_abspos_map['data'].items() :
105 105 if corrected_antenna_name in nominal_antenna_names :
106 106 tb_idx = nominal_antenna_names.index(corrected_antenna_name)
107 107 if len(antennas_to_correct) != 0 :
108 108 antennas_to_correct += ","
109 109 antennas_to_correct += corrected_antenna_name
110 110 differential_pos.append(corrected_abspos[0] - nominal_abspos[0][tb_idx])
111 111 differential_pos.append(corrected_abspos[1] - nominal_abspos[1][tb_idx])
112 112 differential_pos.append(corrected_abspos[2] - nominal_abspos[2][tb_idx])
113 + else:
114 + raise ValueError("Antenna {} could not be found in input MS".format(corrected_antenna_name))
115 + if (len(differential_pos) == 0) :
116 + raise ValueError("The list of antenna positions in JSON file is empty")
117 +
113 118
114 119 return antennas_to_correct, differential_pos
115 120

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

Add shortcut