Skip to content

Commit

Permalink
minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v-null committed Oct 15, 2024
1 parent f34beb0 commit 50018c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions demo/11_allsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def main():
# Create lmn grid
lmn = create_lmn_grid(n_pix)

# Generate our weight vector
# i,j: pixel indexes, a: antenna index, d: lmn/xyz index
phs = np.einsum("ijd,ad", lmn, ant_pos_enu, optimize=True)

for t_idx, t in enumerate(times):
# Attach earth location and compute local sidereal time

Expand All @@ -274,10 +278,7 @@ def main():
if "FREQ" not in degenerate_axes:
f_slice, f_suffix = [f_idx], f"-ch{f_idx}"

# Generate our weight vector
# i,j: pixel indexes, a: antenna index, d: lmn/xyz index
phs = np.einsum("ijd,ad", lmn, ant_pos_enu / λ, optimize=True)
w_vec = np.exp(1j * 2 * np.pi * phs)
w_vec = np.exp(1j * 2 * np.pi * phs / λ)
for p_idx, pol in enumerate(ss.get_pols()):

p_slice, p_suffix = [], ""
Expand Down

0 comments on commit 50018c3

Please sign in to comment.