Skip to content

Commit

Permalink
Ensure LSTs are set before testing them
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Dec 2, 2023
1 parent 65a8e65 commit 36320e3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pyuvdata/uvcal/calh5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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,
Expand Down

0 comments on commit 36320e3

Please sign in to comment.