Skip to content
Snippets Groups Projects
Commit bdb6d33d authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Fix inspect plot

parent a3331b6c
Branches
Tags v0.1.7
No related merge requests found
......@@ -68,10 +68,17 @@ requirements:
n_baselines = int((n_antennas + 1) * n_antennas * .5)
n_times = flags.shape[0] // n_baselines
dataloss = np.array(vis == 0, dtype=np.int)
dataloss_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1], weights=np.nanmean(dataloss, axis=(1,2)))
flag_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1], weights=np.nanmean(flags, axis=(1,2)))
coverage, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[sampling, sampling, 1])
urange = np.linspace(-np.max(uvw[:, 0]), np.max(uvw[:, 0]), sampling, endpoint=True)
vrange = np.linspace(-np.max(uvw[:, 1]), np.max(uvw[:, 1]), sampling, endpoint=True)
dataloss_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1], weights=np.nanmean(dataloss, axis=(1,2)))
dataloss_matrix += np.histogramdd(-uvw, bins=[urange, vrange, 1], weights=np.nanmean(dataloss, axis=(1,2)))[0]
flag_matrix, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1], weights=np.nanmean(flags, axis=(1,2)))
flag_matrix += np.histogramdd(-uvw, bins=[urange, vrange, 1], weights=np.nanmean(flags, axis=(1,2)))[0]
coverage, (urange, vrange, wrange) = np.histogramdd(uvw, bins=[urange, vrange, 1])
coverage += np.histogramdd(-uvw, bins=[urange, vrange, 1])[0]
flags = flags.reshape(n_times, n_baselines, *flags.shape[1:], order='C')
dataloss = dataloss.reshape(n_times, n_baselines, *flags.shape[2:], order='C')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment