diff --git a/pyuvdata/uvdata/mir.py b/pyuvdata/uvdata/mir.py index 16f173678..ba50879e2 100644 --- a/pyuvdata/uvdata/mir.py +++ b/pyuvdata/uvdata/mir.py @@ -98,6 +98,7 @@ def read_mir( rechunk=None, compass_soln=None, swarm_only=True, + codes_check=True, run_check=True, check_extra=True, run_check_acceptability=True, @@ -110,9 +111,14 @@ def read_mir( # Use the mir_parser to read in metadata, which can be used to select data. # We want to sure that the mir file is v3 compliant, since correctly filling # values into a UVData object depends on that. - mir_data = mir_parser.MirParser( - filepath=filepath, compass_soln=compass_soln, make_v3_compliant=True - ) + mir_data = mir_parser.MirParser(filepath=filepath, compass_soln=compass_soln) + + if codes_check: + where_list = [] + for code in mir_data.codes_data._mutable_codes: + if code in mir_data.codes_data.get_code_names(): + where_list.append((code, "eq", list(mir_data.codes_data[code]))) + mir_data.select(where=where_list) if select_where is None: select_where = [] diff --git a/pyuvdata/uvdata/mir_parser.py b/pyuvdata/uvdata/mir_parser.py index 24be33cd9..2e52bdfcd 100644 --- a/pyuvdata/uvdata/mir_parser.py +++ b/pyuvdata/uvdata/mir_parser.py @@ -581,7 +581,7 @@ def _fix_int_dict(self, data_type=None): # Go through the individual entries in each dict, and update them # with the "correct" values as determined by scanning through sch_read - for key in new_dict: + for key in inhid_map: int_dict[inhid_map[key]] = new_dict[key] @staticmethod