Skip to content

Commit

Permalink
radialV: mask empty bins
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffjennings committed Oct 27, 2023
1 parent c009f23 commit 10b7fb2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mpol/onedim.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def radialV(V, coords, geom, rescale_flux, bins=None):
# cumulative binned visibility amplitude in each annulus
Vs, _ = np.histogram(a=qq, bins=bins, weights=Vp)

# mask empty bins
mask = (bin_counts == 0)
Vs = np.ma.masked_where(mask, Vs)

# average binned visibility amplitude in each annulus
Vs /= bin_counts

Expand Down

0 comments on commit 10b7fb2

Please sign in to comment.