From 36320e36683b9bc406d5553cd55ad49e1de726b7 Mon Sep 17 00:00:00 2001 From: Bryna Hazelton Date: Sat, 2 Dec 2023 09:14:19 -0800 Subject: [PATCH] Ensure LSTs are set before testing them --- pyuvdata/uvcal/calh5.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pyuvdata/uvcal/calh5.py b/pyuvdata/uvcal/calh5.py index c358d0f478..b30f475cb8 100644 --- a/pyuvdata/uvcal/calh5.py +++ b/pyuvdata/uvcal/calh5.py @@ -240,6 +240,12 @@ def _read_header( except AttributeError as e: raise KeyError(str(e)) from e + self._set_future_array_shapes() + if self.wide_band: + self._set_wide_band() + if self.Nspws > 1 and not self.wide_band: + self._set_flex_spw() + if not uvutils._check_history_version(self.history, self.pyuvdata_version_str): self.history += self.pyuvdata_version_str @@ -272,6 +278,10 @@ def _read_header( except ValueError as ve: warnings.warn(str(ve)) + # ensure LSTs are set before checking them. + if proc is not None: + proc.join() + if run_check_acceptability: lat, lon, alt = self.telescope_location_lat_lon_alt_degrees if self.time_array is not None: @@ -294,14 +304,6 @@ def _read_header( lst_tols=(0, uvutils.LST_RAD_TOL), frame=self._telescope_location.frame, ) - self._set_future_array_shapes() - if self.wide_band: - self._set_wide_band() - if self.Nspws > 1 and not self.wide_band: - self._set_flex_spw() - - if proc is not None: - proc.join() def _get_data( self,