Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/tuesday/core/instrument_models/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,7 @@ def filter_chunk(uv_chunk, freqs_chunk):

uvtau = np.fft.fft(uv_chunk, axis=-1)
this_dnu = np.mean(np.diff(freqs_chunk))
tau = (
np.fft.fftshift(
np.fft.fftfreq(uv_chunk.shape[-1], d=this_dnu.to(un.Hz).value)
)
* un.s
)
tau = np.fft.fftfreq(uv_chunk.shape[-1], d=this_dnu.to(un.Hz).value) * un.s

kperp_mag = np.add.outer(kperp_grid**2, kperp_grid**2) ** 0.5
umag = kperp_mag / dk_du(f2z(f0), with_h=with_h)
Expand All @@ -429,7 +424,7 @@ def filter_chunk(uv_chunk, freqs_chunk):
# frequencies are probably not exactly regular).
wedge = wedge_slope * umag / f0

mask = tau[None, None] < wedge[:, :, None] + buffer
mask = np.abs(tau)[None, None] < wedge[:, :, None] + buffer
uvtau[:, mask] = 0.0
return np.fft.ifft(uvtau, axis=-1)

Expand Down
Loading