Skip to content

Commit b5a430c

Browse files
committed
do not even calculate the beams if convolve is off
1 parent 378cbf7 commit b5a430c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/py21cmwedge/uvgridder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,12 @@ def grid_uvw(self, convolve_beam=True, spatial_function="triangle"):
346346
)
347347
for uv_key in self.uvbins.keys():
348348
self.__sum_uv__(uv_key, spatial_function=spatial_function)
349-
beam_array = self.get_uv_beam()
350-
# if only one beam was given, use that beam for all freqs
351-
if np.shape(beam_array)[0] < self.freqs.size:
352-
beam_array = np.tile(beam_array[0], (self.freqs.size, 1, 1))
353349

354350
if convolve_beam:
351+
beam_array = self.get_uv_beam()
352+
# if only one beam was given, use that beam for all freqs
353+
if np.shape(beam_array)[0] < self.freqs.size:
354+
beam_array = np.tile(beam_array[0], (self.freqs.size, 1, 1))
355355
for _fq in range(self.freqs.size):
356356
beam = beam_array[_fq]
357357
self.uvf_cube[_fq] = fftconvolve(self.uvf_cube[_fq], beam, mode="same")

0 commit comments

Comments
 (0)