Skip to content

Commit

Permalink
fix(beamform): use local_array in RingmapStack2D
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Siegel committed Oct 13, 2024
1 parent 977c1e5 commit 88027a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions draco/analysis/beamform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,11 @@ def process(self, catalog: containers.SourceCatalog) -> containers.FormedBeam:
local_freq = ringmap.freq[fs:fe]

# Dereference the datasets
rmm = ringmap.map[:]
rmm = ringmap.map[:].local_array
rmw = (
ringmap.weight[:]
ringmap.weight[:].local_array
if "weight" in ringmap.datasets
else invert_no_zero(ringmap.rms[:]) ** 2
else invert_no_zero(ringmap.rms[:].local_array) ** 2
)

# Calculate the frequencies bins to use
Expand Down Expand Up @@ -1563,7 +1563,6 @@ def get_template(self, pol, dec, ha):
First column is entirely 1 and corresponds to an overall additive
offset. Second column is the primary beam model versus hour angle.
"""

t = np.ones((self.freq_local.size, ha.size, 2), dtype=float)
t[..., 1] = self._beamfunc(pol, dec, ha)

Expand Down

0 comments on commit 88027a3

Please sign in to comment.