Skip to content

Commit

Permalink
fix 0 vis bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wilensky committed May 28, 2024
1 parent 5be3560 commit 8b3cb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beam_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
# Generate fluxes
beta_ptsrc = -2.7
ptsrc_amps = 10.**np.random.uniform(low=-1., high=2., size=args.Nptsrc)
fluxes = get_flux_from_ptsrc_amp(ptsrc_amps, freqs, beta_ptsrc)
fluxes = get_flux_from_ptsrc_amp(ptsrc_amps, freqs * 1e-6, beta_ptsrc) # Have to put this in MHz...
print("pstrc amps (input):", ptsrc_amps[:5])
np.save(os.path.join(output_dir, "ptsrc_amps0"), ptsrc_amps)
np.save(os.path.join(output_dir, "ptsrc_coords0"), np.column_stack((ra, dec)).T)
Expand Down Expand Up @@ -276,7 +276,7 @@
noise_var = autos[:, :, None] * autos[:, :, :, None] / (args.integration_depth * args.ch_wid)

noise = (np.random.normal(scale=np.sqrt(noise_var)) + 1.j * np.random.normal(scale=np.sqrt(noise_var))) / np.sqrt(2)
data = _sim_vis + noise
data = _sim_vis + _sim_vis.swapaxes(-1,-2).conj() + noise # fix some zeros
del _sim_vis # Save some memory
del noise

Expand Down

0 comments on commit 8b3cb2c

Please sign in to comment.