diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a9df9240..439f37e41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file. - ATA has been added to the list of known telescopes. ### Fixed +- Bug in the `uvh5._add` method that expected keys which could be +optional for some phase-center catalog-entry types. This was noticed as an issue when +adding two uvh5 objects that were of type "sidereal" which did not have "info_source" +entries in their phase-center catalogs. - Bug in the `look_in_catalog` utility function that expected keys which could be optional for some phase-center catalog-entry types. This was noticed as an issue when adding two uvh5 objects that were of type "sidereal" which did not have "cat_times" diff --git a/src/pyuvdata/uvdata/uvdata.py b/src/pyuvdata/uvdata/uvdata.py index ef21a37e8..13666c5f5 100644 --- a/src/pyuvdata/uvdata/uvdata.py +++ b/src/pyuvdata/uvdata/uvdata.py @@ -1397,9 +1397,9 @@ def _consolidate_phase_center_catalogs( # match, so this is functionally the same source self._update_phase_center_id(match_id, new_id=cat_id) # look_in_catalog ignores the "info_source" field, so update it to match - info_source = cat_entry.get("info_source") - if info_source is not None: - self.phase_center_catalog[cat_id]["info_source"] = info_source + self.phase_center_catalog[cat_id]["info_source"] = cat_entry.get( + "info_source" + ) if ignore_name: # Make the names match if names were ignored in matching self.phase_center_catalog[cat_id]["cat_name"] = cat_entry["cat_name"]