Skip to content

Commit

Permalink
fix(beamform): bug parsing lsd attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jrs65 committed Apr 30, 2020
1 parent a387c68 commit 3e873b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions draco/analysis/beamform.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@ def _process_data(self, data):
"SiderealStream must have an LSD attribute to calculate the epoch."
)

# This will be a string for a single sidereal day, or a list of
# strings for a stack
# This will be a float for a single sidereal day, or a list of
# floats for a stack
lsd = (
int(data.attrs["lsd"])
if isinstance(data.attrs["lsd"], str)
else int(data.attrs["lsd"][0])
data.attrs["lsd"][0]
if isinstance(data.attrs["lsd"], np.ndarray)
else data.attrs["lsd"]
)
self.epoch = self.telescope.lsd_to_unix(lsd)

Expand Down

0 comments on commit 3e873b9

Please sign in to comment.